[libvirt] [PATCH 3/3] mpath: Don't allow more than one mpath pool at a time

John Ferlan jferlan at redhat.com
Wed Jun 24 13:06:28 UTC 2015


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.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 docs/storage.html.in    | 3 ++-
 src/conf/storage_conf.c | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/docs/storage.html.in b/docs/storage.html.in
index 0b467d5..6c8222a 100644
--- a/docs/storage.html.in
+++ b/docs/storage.html.in
@@ -505,7 +505,8 @@
     <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/>
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 4bbed4f..971f5c1 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -2560,6 +2560,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;
-- 
2.1.0




More information about the libvir-list mailing list