|
|
6ae9ed |
From 804758be414002c97bd12dd03ec26cd867771185 Mon Sep 17 00:00:00 2001
|
|
|
6ae9ed |
Message-Id: <804758be414002c97bd12dd03ec26cd867771185@dist-git>
|
|
|
6ae9ed |
From: John Ferlan <jferlan@redhat.com>
|
|
|
6ae9ed |
Date: Fri, 5 Aug 2016 09:44:05 -0400
|
|
|
6ae9ed |
Subject: [PATCH] storage: Don't remove the pool for buildPool failure in
|
|
|
6ae9ed |
storagePoolCreate
|
|
|
6ae9ed |
|
|
|
6ae9ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1362349
|
|
|
6ae9ed |
|
|
|
6ae9ed |
When adding the ability to build the pool during the start pool processing
|
|
|
6ae9ed |
using the similar flags as buildPool processing would use, the code was
|
|
|
6ae9ed |
essentially cut-n-pasted from storagePoolCreateXML. However, that included
|
|
|
6ae9ed |
a call to virStoragePoolObjRemove which shouldn't happen within the
|
|
|
6ae9ed |
storagePoolCreate path since that'll remove the pool from the list of
|
|
|
6ae9ed |
pools only to be rediscovered if libvirtd restarts.
|
|
|
6ae9ed |
|
|
|
6ae9ed |
So on failure, just fail and return as we should expect
|
|
|
6ae9ed |
|
|
|
6ae9ed |
(cherry picked from commit fbfd6f2103a56df73238b023032dfb1242a4d7d5)
|
|
|
6ae9ed |
Signed-off-by: John Ferlan <jferlan@redhat.com>
|
|
|
6ae9ed |
---
|
|
|
6ae9ed |
src/storage/storage_driver.c | 5 +----
|
|
|
6ae9ed |
1 file changed, 1 insertion(+), 4 deletions(-)
|
|
|
6ae9ed |
|
|
|
6ae9ed |
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
|
|
|
6ae9ed |
index cb9d578..5d26109 100644
|
|
|
6ae9ed |
--- a/src/storage/storage_driver.c
|
|
|
6ae9ed |
+++ b/src/storage/storage_driver.c
|
|
|
6ae9ed |
@@ -931,11 +931,8 @@ storagePoolCreate(virStoragePoolPtr obj,
|
|
|
6ae9ed |
|
|
|
6ae9ed |
if (build_flags ||
|
|
|
6ae9ed |
(flags & VIR_STORAGE_POOL_CREATE_WITH_BUILD)) {
|
|
|
6ae9ed |
- if (backend->buildPool(obj->conn, pool, build_flags) < 0) {
|
|
|
6ae9ed |
- virStoragePoolObjRemove(&driver->pools, pool);
|
|
|
6ae9ed |
- pool = NULL;
|
|
|
6ae9ed |
+ if (backend->buildPool(obj->conn, pool, build_flags) < 0)
|
|
|
6ae9ed |
goto cleanup;
|
|
|
6ae9ed |
- }
|
|
|
6ae9ed |
}
|
|
|
6ae9ed |
}
|
|
|
6ae9ed |
|
|
|
6ae9ed |
--
|
|
|
6ae9ed |
2.9.2
|
|
|
6ae9ed |
|