[libvirt] [PATCHv2 0/2] Restore logical pool functionality

John Ferlan (1): storage: Better describe logical pool creation/definition parameters Ján Tomko (1): Revert "storage: Better describe logical pool creation/definition parameters" src/conf/storage_conf.c | 8 -------- tools/virsh.pod | 7 +++---- 2 files changed, 3 insertions(+), 12 deletions(-) -- 2.10.2

This reverts commit ca4515d2639057020c749470f390fe1f5981e91e which also included a functional change that broke logical storage pools not named after their volume groups. --- src/conf/storage_conf.c | 8 -------- tools/virsh.pod | 7 ------- 2 files changed, 15 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 5213503..585ca71 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -760,14 +760,6 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt) if (VIR_STRDUP(ret->source.name, ret->name) < 0) goto error; } - if (ret->type == VIR_STORAGE_POOL_LOGICAL && - STRNEQ(ret->name, ret->source.name)) { - virReportError(VIR_ERR_XML_ERROR, - _("for a logical pool, the pool name='%s' " - "must match the pool source name='%s'"), - ret->name, ret->source.name); - goto error; - } } if ((options->flags & VIR_STORAGE_POOL_SOURCE_ADAPTER) && diff --git a/tools/virsh.pod b/tools/virsh.pod index 55b71a9..43124ba 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -3639,13 +3639,6 @@ follow-up command to build the pool. The I<--overwrite> and I<--no-overwrite> flags follow the same rules as B<pool-build>. If just I<--build> is provided, then B<pool-build> is called with no flags. -For a "logical" pool only [I<--name>] needs to be provided. The [I<--name>] -must match the Volume Group name for which the pool is being defined or -created. The [I<--source-name>] if provided must match the Volume Group -name. If not provided, one will be generated using the [I<--name>]. If -provided the [I<--target>] is ignored and a target source is generated -using the [I<--source-name>] (or as generated from the [I<--name>]). - =item B<pool-define> I<file> Define an inactive persistent storage pool or modify an existing persistent one -- 2.10.2

From: John Ferlan <jferlan@redhat.com> https://bugzilla.redhat.com/show_bug.cgi?id=1398087 Clean up the virsh man page description for --pool-create-as in order to better describe how the various arguments are used when creating (or defining) a logical pool. Signed-off-by: Ján Tomko <jtomko@redhat.com> --- tools/virsh.pod | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/virsh.pod b/tools/virsh.pod index 43124ba..9a52d67 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -3639,6 +3639,12 @@ follow-up command to build the pool. The I<--overwrite> and I<--no-overwrite> flags follow the same rules as B<pool-build>. If just I<--build> is provided, then B<pool-build> is called with no flags. +For a "logical" pool only [I<--name>] needs to be provided. The +[I<--source-name>] if provided must match the Volume Group name. +If not provided, one will be generated using the [I<--name>]. If +provided the [I<--target>] is ignored and a target source is generated +using the [I<--source-name>] (or as generated from the [I<--name>]). + =item B<pool-define> I<file> Define an inactive persistent storage pool or modify an existing persistent one -- 2.10.2

On 03/28/2017 04:40 AM, Ján Tomko wrote:
John Ferlan (1): storage: Better describe logical pool creation/definition parameters
Ján Tomko (1): Revert "storage: Better describe logical pool creation/definition parameters"
src/conf/storage_conf.c | 8 -------- tools/virsh.pod | 7 +++---- 2 files changed, 3 insertions(+), 12 deletions(-)
ACK series, John Since it was asked... The answer to "why" comes from reading the bz and considering the frustration of someone that was trying to use the virsh pool-define-as command to create a logical pool and well assuming more about the name given the test pools I have. In the long run source.name is the key for the pool and volume group connection. There there was code that copied source.name from name when source.name was not provided, so something just clicked that said well the opposite must be true to if someone provides both then they should be the same.
participants (2)
-
John Ferlan
-
Ján Tomko