[libvirt] [PATCH] storage: Need to clear pool prior to refreshPool during Autostart
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 Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/storage/storage_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index e1dd448..ad92c9b 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -125,6 +125,7 @@ storageDriverAutostart(void) } if (started) { + virStoragePoolObjClearVols(pool); if (backend->refreshPool(conn, pool) < 0) { virErrorPtr err = virGetLastError(); if (backend->stopPool) -- 2.1.0
On Fri, Jan 30, 2015 at 02:25:18PM -0500, John Ferlan wrote:
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
Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/storage/storage_driver.c | 1 + 1 file changed, 1 insertion(+)
ACK, also worthy of backporting to v1.2.9-maint. Jan
On 02/02/2015 03:31 AM, Ján Tomko wrote:
On Fri, Jan 30, 2015 at 02:25:18PM -0500, John Ferlan wrote:
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
Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/storage/storage_driver.c | 1 + 1 file changed, 1 insertion(+)
ACK, also worthy of backporting to v1.2.9-maint.
Jan
OK - did that too. Tks, John
participants (2)
-
John Ferlan -
Ján Tomko