domain: Reset net/disk skip lists when VM is inactive (bz 796092)

Racey shutdown can mean we try to poll disk stats at a time when
it won't work. Resetting the lists give things a chance to work
correctly when the VM is rebooted.
This commit is contained in:
Cole Robinson 2014-02-01 08:15:24 -05:00
parent 24c1c5a2bd
commit 17c0ae3a3c

View File

@ -1645,6 +1645,7 @@ class vmmDomain(vmmLibvirtObject):
if (not self._stats_net_supported or
not self._enable_net_poll or
not self.is_active()):
self._stats_net_skip = []
return rx, tx
for netdev in self.get_network_devices(refresh_if_nec=False):
@ -1682,6 +1683,7 @@ class vmmDomain(vmmLibvirtObject):
if (not self._stats_disk_supported or
not self._enable_disk_poll or
not self.is_active()):
self._stats_disk_skip = []
return rd, wr
for disk in self.get_disk_devices(refresh_if_nec=False):