1. 17 2月, 2016 18 次提交
  2. 16 2月, 2016 5 次提交
  3. 15 2月, 2016 4 次提交
    • J
      Spell VMware with a lowercase w · d6165440
      Ján Tomko 提交于
      Replace all occurrences of VMWare outside the news.
      d6165440
    • L
      util: clean up and expand 802.1QbX negotiation logging · 9cb8b0e5
      Laine Stump 提交于
      The existing log messages for this have several problems; there are
      two lines of log when one will suffice, they duplicate the function
      name in log message (when it's already included by VIR_DEBUG), they're
      missing some useful bits, they get logged even when the call is a NOP.
      
      This patch cleans up the problems with those existing logs, and also
      adds a new VIR_INFO-level log down at the function that is actually
      creating and sending the netlink message that logs *everything* going
      into the netlink message (which turns out to be much more useful in
      practice for me; I didn't want to eliminate the logs at the existing
      location though, in case they are useful in some scenario I'm
      unfamiliar with; anyway those logs are remaining at debug level, so it
      shouldn't be a bother to anyone).
      9cb8b0e5
    • L
      network: consolidated info log for all network allocate/free operations · eb72bd63
      Laine Stump 提交于
      There are three functions that deal with allocating and freeing
      devices from a networks netdev/pci device pool:
      network(Allocate|Notify|Release)ActualDevice(). These functions also
      maintain a counter of the number of domains currently using a network
      (regardless of whether or not that network uses a device pool). Each
      of these functions had multiple log messages (output using VIR_DEBUG)
      that were in slightly different formats and gave varying amounts of
      information.
      
      This patch creates a single function to log the pertinent information
      in a consistent manner for all three of these functions. Along with
      assuring that all the functions produce a consistent form of output
      (and making it simpler to change), it adds the MAC address of the
      domain interface involved in the operation, making it possible to
      verify which interface of which domain the operation is being done for
      (assuming that all MAC addresses are unique, of course).
      
      All of these messages are raised from DEBUG to INFO, since they don't
      happen that often (once per interface per domain/libvirtd start or
      domain stop), and can be very informative and helpful - eliminating
      the need to log debug level messages makes it much easier to sort
      these out.
      eb72bd63
    • L
      network: consolidate connection count updates for device pool · 3ea8b8b8
      Laine Stump 提交于
      networkReleaseActualDevice() and networkNotifyActualDevice() both were
      updating the individual devices' connections count in two separate
      places (unlike networkAllocateActualDevice() which does it in a single
      unified place after success:). The code is correct, but prone to
      confusion / later breakage. All of these updates are anyway located at
      the end of if/else clauses that are (with the exception of a single
      VIR_DEBUG() in each case) immediately followed by the success: label
      anyway, so this patch replaces the duplicated ++/-- instructions with
      a single ++/-- inside a qualifying "if (dev)" down below success:.
      (NB: if dev != NULL, by definition we are using a device (either pci
      or netdev, doesn't matter for these purposes) from the network's pool)
      
      The VIR_DEBUG args (which will be replaced in a followup patch anyway)
      were all adjusted to account for the connection count being out of
      date at the time.
      3ea8b8b8
  4. 13 2月, 2016 3 次提交
  5. 12 2月, 2016 6 次提交
    • M
      storageVolCreateXMLFrom: Check if backend knows how to createVol · 611a278f
      Michal Privoznik 提交于
      It is highly unlikely that a backend will know how to create a
      volume from a different volume (buildVolFrom) and not know how to
      create an empty volume (createVol). But:
      1) we call the function without any prior check so if that's the
      case we would SIGSEGV immediatelly
      2) it's better to be safe than sorry.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      611a278f
    • M
      storageVolCreateXML: Swap order of two operations · 78490acc
      Michal Privoznik 提交于
      Firstly, we realloc internal list to hold new item (=volume that
      will be potentially created) and then we check whether we
      actually know how to create it. If we don't we consume more
      memory than we really need for no good reason.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      78490acc
    • M
      vz: fix race condition when adding domain to domains list · 9c14a9ab
      Mikhail Feoktistov 提交于
      Race condition:
      User calls defineXML to create new instance.
      The main thread from vzDomainDefineXMLFlags() creates new instance by prlsdkCreateVm.
      Then this thread calls prlsdkAddDomain to add new domain to domains list.
      The second thread receives notification from hypervisor that new VM was created.
      It calls prlsdkHandleVmAddedEvent() and also tries to add new domain to domains list.
      These two threads call virDomainObjListFindByUUID() from prlsdkAddDomain() and don't find new domain.
      So they add two domains with the same uuid to domains list.
      
      This fix splits logic of prlsdkAddDomain() into two functions.
      1. vzNewDomain() creates new empty domain in domains list with the specific uuid.
      2. prlsdkLoadDomain() add data from VM to domain object.
      
      New algorithm for creating an instance:
      In vzDomainDefineXMLFlags() we add new domain to domain list by calling vzNewDomain()
      and only after that we call CreateVm() to create VM.
      It means that we "reserve" domain object with the specific uuid.
      After creation of new VM we add info from this VM
      to reserved domain object by calling prlsdkLoadDomain().
      
      Before this patch prlsdkLoadDomain() worked in 2 different cases:
      1. It creates and initializes new domain. Then updates it from sdk handle.
      2. It updates existed domain from sdk handle.
      In this patch we remove code which creates new domain from LoadDomain()
      and move it to vzNewDomain().
      Now prlsdkLoadDomain() only updates domain from skd handle.
      
      In notification handler prlsdkHandleVmAddedEvent() we check
      the existence of a domain and if it doesn't exist we add new domain by calling
      vzNewDomain() and load info from sdk handle via prlsdkLoadDomain().
      9c14a9ab
    • M
      vz: fix notification subscription · d5f0cf99
      Mikhail Feoktistov 提交于
      Bug cause:
      Update the domain that is subscribed to hypervisor notification.
      LoadDomain() rewrites notifications fields in vzDomObj structure and makes domain as "unsubscribed".
      Fix:
      Initialize notification fields in vzDomObj only if we create a new domain.
      And do not reinitialize these fields if we update domain (by calling LoadDomain with olddom argument)
      d5f0cf99
    • M
      vz: remove unused struct field · a7b2257e
      Mikhail Feoktistov 提交于
      In commit 7039bb3c we have removed code that saves uuid to vzDomObj.uuid
      So this field is no longer needed.
      a7b2257e
    • M
      vz: make output arguments in prlsdkGetDomainIds as optional · 2286986a
      Mikhail Feoktistov 提交于
      prlsdkGetDomainIds() returns name and uuid for specified instance.
      Now output arguments can be NULL.
      It allows to get only necessary info(name or uuid).
      2286986a
  6. 11 2月, 2016 4 次提交