From a77056bdb5d6d3942daf3f472d2dc3faa10bbe06 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Wed, 24 Jun 2015 08:45:24 -0400 Subject: [PATCH] mpath: Don't allow more than one mpath pool at a time 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 | 2 ++ docs/storage.html.in | 3 ++- src/conf/storage_conf.c | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/formatstorage.html.in b/docs/formatstorage.html.in index b6f43613ee..a60e05e650 100644 --- a/docs/formatstorage.html.in +++ b/docs/formatstorage.html.in @@ -401,6 +401,8 @@ guaranteed stable across reboots, since they are allocated on demand. It is preferable to use a stable location such as one of the /dev/disk/by-{path|id|uuid|label} locations. + For a Multipath pool (type mpath), the provided + value is ignored and the default value of "/dev/mapper" is used. Since 0.4.1
permissions
diff --git a/docs/storage.html.in b/docs/storage.html.in index 0b467d586d..6c8222abe8 100644 --- a/docs/storage.html.in +++ b/docs/storage.html.in @@ -505,7 +505,8 @@

Multipath pools

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.

diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index a7476a30d7..9dae1a39bb 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -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; -- GitLab