]> xenbits.xensource.com Git - libvirt.git/commitdiff
mpath: Don't allow more than one mpath pool at a time
authorJohn Ferlan <jferlan@redhat.com>
Wed, 24 Jun 2015 12:45:24 +0000 (08:45 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 30 Jun 2015 15:21:42 +0000 (11:21 -0400)
https://bugzilla.redhat.com/show_bug.cgi?id=1232606

Since an mpath pool contains all the Multipath devices on a host, allowing
more than one defined on a host at a time should be disallowed under the
policy of disallowing duplicate source pools for the host.

Adjust to docs to clarify the Multipath target path value usage for both
the storage driver (only 1 pool per host) and formatstorage references
(ignore the target element in favor of the default target mapping of
/dev/mapper).

docs/formatstorage.html.in
docs/storage.html.in
src/conf/storage_conf.c

index b6f43613ee3dbcb9e03d771abc68052e86f37cb0..a60e05e65072d5b518fec202aa80998b66659d20 100644 (file)
         guaranteed stable across reboots, since they are allocated on
         demand. It is preferable to use a stable location such as one
         of the <code>/dev/disk/by-{path|id|uuid|label}</code> locations.
+        For a Multipath pool (type <code>mpath</code>), the provided
+        value is ignored and the default value of "/dev/mapper" is used.
         <span class="since">Since 0.4.1</span>
       </dd>
       <dt><code>permissions</code></dt>
index 0b467d586d5885babea57e14330373f04fe43051..6c8222abe8d08ea2a2527bc54334de2ed3ea4506 100644 (file)
     <h2><a name="StorageBackendMultipath">Multipath pools</a></h2>
     <p>
       This provides a pool that contains all the multipath devices on the
-      host. Volume creating is not supported via the libvirt APIs.
+      host. Therefore, only one Multipath pool may be configured per host.
+      Volume creating is not supported via the libvirt APIs.
       The target element is actually ignored, but one is required to appease
       the libvirt XML parser.<br/>
       <br/>
index a7476a30d73eb5e7429800c150dc67c2f1328731..9dae1a39bb5bfee3f56ee928059c05affd1aefde 100644 (file)
@@ -2569,6 +2569,9 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
                 matchpool = pool;
             break;
         case VIR_STORAGE_POOL_MPATH:
+            /* Only one mpath pool is valid per host */
+            matchpool = pool;
+            break;
         case VIR_STORAGE_POOL_RBD:
         case VIR_STORAGE_POOL_LAST:
             break;