storagepool: Don't refresh newly arriving pools
If they show up while a connection is 'active', it means they were just defined/created, and thus a pool refresh is likely redundant
This commit is contained in:
parent
53459cb0f6
commit
6d587c40bb
|
@ -148,7 +148,12 @@ class vmmStoragePool(vmmLibvirtObject):
|
|||
|
||||
def _init_libvirt_state(self):
|
||||
self.tick()
|
||||
self.refresh(_do_refresh_xml=False)
|
||||
if not self.conn.is_active():
|
||||
# We only want to refresh a pool on initial conn startup,
|
||||
# since the pools may be out of date. But if a storage pool
|
||||
# shows up while the conn is connected, this means it was
|
||||
# just 'defined' recently and doesn't need to be refreshed.
|
||||
self.refresh(_do_refresh_xml=False)
|
||||
for vol in self.get_volumes():
|
||||
vol.init_libvirt_state()
|
||||
|
||||
|
|
Loading…
Reference in New Issue