1. 15 10月, 2019 1 次提交
  2. 14 10月, 2019 4 次提交
  3. 10 10月, 2019 3 次提交
  4. 09 10月, 2019 1 次提交
  5. 07 10月, 2019 2 次提交
  6. 27 9月, 2019 5 次提交
    • P
      conf: Drop pointless 'domain' argument from virDomainSnapshotRedefinePrep · efeb6232
      Peter Krempa 提交于
      'vm' is passed in which contains the definition which contains the UUID
      so we don't need another parameter for this.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      efeb6232
    • P
      conf: Drop pointless 'domain' argument from virDomainCheckpointRedefinePrep · 4c94f8d8
      Peter Krempa 提交于
      'vm' is passed in which contains the definition which contains the UUID
      so we don't need another parameter for this.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      4c94f8d8
    • L
      conf: refresh network ports missing from network driver on restart · 98fe739e
      Laine Stump 提交于
      Before the refactoring that properly separated the network driver from
      the hypervisor driver and forced all interaction to go through public
      APIs, all network usage counters were zeroed when the network driver
      was initialized, and the network driver's now-deprecated
      "semi-private" API networkNotifyActualDevice() was called for every
      interface of every domain as each hypervisor "reconnected" its domains
      during a libvirtd restart, and this would refresh the usage count for
      each network.
      
      Post-driver-split, during libvirtd restart/reconnection of the running
      domains, the function virDomainNetNotifyActualDevice() is called by
      each hypervisor driver for every interface of every domain restart,
      and this function has code to re-register interfaces, but it only
      calls into the network driver to re-register those ports that don't
      already have a valid portid (ie. one that is not simply all 0),
      assuming that those with valid portids are already known (and counted)
      by the network driver.
      
      commit 7ab9bdd4 recently modified the network driver so that, in most
      cases, it properly resyncs each network's connection count during
      libvirtd (or maybe virtnetworkd) restart by iterating through the
      network's port list. This doesn't account for the case where a network
      is destroyed and restarted while there are running domains that have
      active ports on the network. In that case, the entire port list and
      connection count for that network is lost, and now even a restart of
      libvirtd/virtnetworkd/virtqemud, which in the past would resync the
      connection count, doesn't help (the network driver thinks there are no
      active ports, while the hypervisor driver knows about all the active
      ports, but mistakenly believes that the network driver also knows).
      
      The solution to this is to not just bypass valid portids during the
      call to virDomainNetworkNotifyActualDevice(). Instead, we query the
      network driver about the portid that was preserved in the domain
      status, and if it is not registered, we register it.
      
      (NB: while it would technically be correct to just generate a new
      portid for these cases, it makes for less churn in portids (and thus
      may make troubleshooting simpler) if we make the small fix to
      virDomainNetDefActualToNetworkPort() that preserves existing valid
      portids rather than unconditionally generating a new one.)
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      98fe739e
    • L
      conf: take advantage of VIR_AUTOPTR for virNetworkPortDefPtr · b6a8d303
      Laine Stump 提交于
      define a VIR_DEFINE_AUTOPTR_FUNC() to autofree virNetworkPortDefs, and
      convert all uses of virNetworkPortDefPtr that are appropriate to use
      it.
      
      This coincidentally fixes multiple potential memory leaks (in failure
      cases) in networkPortCreateXML()
      Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      b6a8d303
    • L
      conf: utility function to update entry in def->nets array · 7e490cda
      Laine Stump 提交于
      A virDomainNetDef object in a domain's nets array might contain a
      virDomainHostdevDef, and when this is the case, the domain's hostdevs
      array will also have a pointer to this embedded hostdev (this is done
      so that internal functions that need to perform some operation on all
      hostdevs won't leave out the type='hostdev' network interfaces).
      
      When a network device was updated with virDomainUpdateDeviceFlags(),
      we were replacing the entry in the nets array (and free'ing the
      original) but forgetting about the pointer in the hostdevs array
      (which would then point to the now-free'd hostdev contained in the old
      net object.) This often resulted in a libvirtd crash.
      
      The solution is to add a function, virDomainNetUpdate(), called by
      qemuDomainUpdateDeviceConfig(), that updates the hostdevs array
      appropriately along with the nets array.
      
      Resolves: https://bugzilla.redhat.com/1558934Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      7e490cda
  7. 26 9月, 2019 1 次提交
    • M
      domain_conf: Unref video private data in virDomainVideoDefClear() · 4e9d72be
      Michal Privoznik 提交于
      The private data for video definition is created in
      virDomainVideoDefNew() and we attempt to free it in
      virDomainVideoDefFree(). This seems to work, except
      the free function calls clear function which zeroes
      out the whole structure and thus virObjectUnref()
      which is called on private data does nothing.
      
      2,568 bytes in 107 blocks are definitely lost in loss record 207 of 213
         at 0x4A35476: calloc (vg_replace_malloc.c:752)
         by 0x50A6048: virAllocVar (viralloc.c:346)
         by 0x513CC5A: virObjectNew (virobject.c:243)
         by 0x4DC1DEE: qemuDomainVideoPrivateNew (qemu_domain.c:1337)
         by 0x51A6BD6: virDomainVideoDefNew (domain_conf.c:2831)
         by 0x51B9F06: virDomainVideoDefParseXML (domain_conf.c:15541)
         by 0x51CB761: virDomainDefParseXML (domain_conf.c:21158)
         by 0x51C5973: virDomainDefParseNode (domain_conf.c:21708)
         by 0x51C583A: virDomainDefParse (domain_conf.c:21663)
         by 0x51C58AE: virDomainDefParseFile (domain_conf.c:21688)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      4e9d72be
  8. 25 9月, 2019 5 次提交
  9. 20 9月, 2019 1 次提交
  10. 19 9月, 2019 10 次提交
  11. 16 9月, 2019 1 次提交
  12. 14 9月, 2019 1 次提交
    • D
      network: fix connection usage counts after restart · 7ab9bdd4
      Daniel P. Berrangé 提交于
      Since the introduction of the virNetworkPort object, the network driver
      has a persistent record of ports that have been created against the
      networks. Thus the hypervisor drivers no longer communicate to the
      network driver during libvirtd restart.
      
      This change, however, meant that the connection usage counts were
      no longer re-initialized during a libvirtd restart. To deal with this we
      must iterate over all virNetworkPortDefPtr objects we have and invoke
      the notify callback to record the connection usage count.
      Reviewed-by: NLaine Stump <laine@laine.org>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      7ab9bdd4
  13. 12 9月, 2019 3 次提交
  14. 11 9月, 2019 2 次提交