]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
storage: Add duplicate source pool for Gluster pool def
authorJohn Ferlan <jferlan@redhat.com>
Thu, 2 Apr 2015 16:48:04 +0000 (12:48 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 15 Apr 2015 10:50:27 +0000 (06:50 -0400)
Check the proposed pool source host XML definition against existing gluster
pools to ensure the incoming definition doesn't use the same source dir and
soure host XML definition as an existing pool.

src/conf/storage_conf.c

index 2b2104d536491e85201cbd74709b89f09b82bfaa..a4e676193158babcf969fdf619a2fc84020703e5 100644 (file)
@@ -2464,6 +2464,7 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
                 matchpool = pool;
             break;
         case VIR_STORAGE_POOL_NETFS:
+        case VIR_STORAGE_POOL_GLUSTER:
             if (STREQ(pool->def->source.dir, def->source.dir) &&
                 virStoragePoolSourceMatchSingleHost(&pool->def->source,
                                                     &def->source))
@@ -2551,7 +2552,6 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
             break;
         case VIR_STORAGE_POOL_MPATH:
         case VIR_STORAGE_POOL_RBD:
-        case VIR_STORAGE_POOL_GLUSTER:
         case VIR_STORAGE_POOL_ZFS:
         case VIR_STORAGE_POOL_LAST:
             break;