]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix creation of unmanaged pools
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 17 Mar 2008 15:10:48 +0000 (15:10 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 17 Mar 2008 15:10:48 +0000 (15:10 +0000)
ChangeLog
src/storage_driver.c

index 5b92497f4728dcd4af87d0a3b7cc8a39461e46af..10ccfe304e86805d5f8f890ed771b15ce0366ac5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Mar 17 11:10:22 EDT 2008 Daniel P. Berrange <berrange@redhat.com>
+
+       * src/storage_driver.c: Don't crash if backend is missing the
+       startPool operation, and run refreshPool when creating an
+       unmanaged pool
+
 Mon Mar 17 11:09:22 EDT 2008 Daniel P. Berrange <berrange@redhat.com>
 
        * src/storage_backend.c: Cope with missing SELinux context
index 2fa06af21c7f985a4571b575e8fb1ae9ecdd6657..fc3db4cd072883445ba9a460028e7a205a7c780b 100644 (file)
@@ -416,8 +416,12 @@ storagePoolCreate(virConnectPtr conn,
         return NULL;
     }
 
-    if (backend->startPool(conn, pool) < 0) {
-        virStoragePoolObjRemove(driver, pool);
+    if (backend->startPool &&
+        backend->startPool(conn, pool) < 0)
+        return NULL;
+    if (backend->refreshPool(conn, pool) < 0) {
+        if (backend->stopPool)
+            backend->stopPool(conn, pool);
         return NULL;
     }
     pool->active = 1;