]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: Need to clear pool prior to refreshPool during Autostart
authorJohn Ferlan <jferlan@redhat.com>
Fri, 30 Jan 2015 18:21:49 +0000 (13:21 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Sat, 31 Jan 2015 12:56:15 +0000 (07:56 -0500)
https://bugzilla.redhat.com/show_bug.cgi?id=1176510

When storageDriverAutostart is called path virStateReload via a 'service
libvirtd reload', then because the volume list in the pool wasn't cleared
prior to the call, each volume would be listed multiple times (as many
times as we reload). I believe the issue would be introduced by commit
id '9e093f0b' at least for the libvirtd reload path, although I suppose
the introduction of virStateReload (commit id '70da0494') could be a
different cause.

Thus like other places prior to calling refreshPool, we need to call
virStoragePoolObjClearVols

src/storage/storage_driver.c

index e1dd448c81bce33c9fe4276623f8a5a755a63b73..ad92c9bf4522b446c6ada971fcec42edaa014051 100644 (file)
@@ -125,6 +125,7 @@ storageDriverAutostart(void)
         }
 
         if (started) {
+            virStoragePoolObjClearVols(pool);
             if (backend->refreshPool(conn, pool) < 0) {
                 virErrorPtr err = virGetLastError();
                 if (backend->stopPool)