]> xenbits.xensource.com Git - libvirt.git/commit
network: fix connection usage counts after restart
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 13 Sep 2019 14:54:18 +0000 (15:54 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 13 Sep 2019 16:33:58 +0000 (17:33 +0100)
commit7ab9bdd470ea3325da9101f9cce2d0ffbb10ac41
tree873e1134a1acf010f85fbf4290b7869eaa8edf56
parent3eca0e300d71cd04318e6ee8c7b390feca8d807b
network: fix connection usage counts after restart

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: Laine Stump <laine@laine.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/virnetworkobj.c
src/conf/virnetworkobj.h
src/libvirt_private.syms
src/network/bridge_driver.c