提交 fbfd6f21 编写于 作者: J John Ferlan

storage: Don't remove the pool for buildPool failure in storagePoolCreate

https://bugzilla.redhat.com/show_bug.cgi?id=1362349

When adding the ability to build the pool during the start pool processing
using the similar flags as buildPool processing would use, the code was
essentially cut-n-pasted from storagePoolCreateXML.  However, that included
a call to virStoragePoolObjRemove which shouldn't happen within the
storagePoolCreate path since that'll remove the pool from the list of
pools only to be rediscovered if libvirtd restarts.

So on failure, just fail and return as we should expect
上级 3f19ac34
...@@ -931,11 +931,8 @@ storagePoolCreate(virStoragePoolPtr obj, ...@@ -931,11 +931,8 @@ storagePoolCreate(virStoragePoolPtr obj,
if (build_flags || if (build_flags ||
(flags & VIR_STORAGE_POOL_CREATE_WITH_BUILD)) { (flags & VIR_STORAGE_POOL_CREATE_WITH_BUILD)) {
if (backend->buildPool(obj->conn, pool, build_flags) < 0) { if (backend->buildPool(obj->conn, pool, build_flags) < 0)
virStoragePoolObjRemove(&driver->pools, pool);
pool = NULL;
goto cleanup; goto cleanup;
}
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册