From nobody Sat Apr 27 00:21:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1490636555095515.906456847664; Mon, 27 Mar 2017 10:42:35 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A592EC04B938; Mon, 27 Mar 2017 17:42:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7232781C10; Mon, 27 Mar 2017 17:42:33 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 218F14BB75; Mon, 27 Mar 2017 17:42:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2RHgSGm028510 for ; Mon, 27 Mar 2017 13:42:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 35DC78071E; Mon, 27 Mar 2017 17:42:28 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id E548418A34 for ; Mon, 27 Mar 2017 17:42:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A592EC04B938 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A592EC04B938 From: John Ferlan To: libvir-list@redhat.com Date: Mon, 27 Mar 2017 13:42:20 -0400 Message-Id: <20170327174223.24317-2-jferlan@redhat.com> In-Reply-To: <20170327174223.24317-1-jferlan@redhat.com> References: <20170327174223.24317-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/4] conf: Set defaultFormat if no storage source XML present X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 27 Mar 2017 17:42:34 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" While parsing if the storage source is not present, then a defaultFormat was not set. This could lead to oddities such as seeing "unknown" format in output for the "logical" pool even though the only format the pool could support would be "lvm2". This does "put a label" on other pool defaults as follows: File System: FS_AUTO Network File System: NETFS_AUTO Disk: UNKNOWN Each of which is the "0" value for their respective pools and thus would be no "real" change. Signed-off-by: John Ferlan --- src/conf/storage_conf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 28277e5..585ca71 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -703,6 +703,9 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt) if (virStoragePoolDefParseSource(ctxt, &ret->source, ret->type, source_node) < 0) goto error; + } else { + if (options->formatFromString) + ret->source.format =3D options->defaultFormat; } =20 ret->name =3D virXPathString("string(./name)", ctxt); --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 00:21:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1490636558572998.7853478673235; Mon, 27 Mar 2017 10:42:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 476EB64A77; Mon, 27 Mar 2017 17:42:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D3A917A79; Mon, 27 Mar 2017 17:42:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CBDA118523CB; Mon, 27 Mar 2017 17:42:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2RHgSLw028515 for ; Mon, 27 Mar 2017 13:42:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9F99A18A34; Mon, 27 Mar 2017 17:42:28 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E6C08867D for ; Mon, 27 Mar 2017 17:42:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 476EB64A77 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 476EB64A77 From: John Ferlan To: libvir-list@redhat.com Date: Mon, 27 Mar 2017 13:42:21 -0400 Message-Id: <20170327174223.24317-3-jferlan@redhat.com> In-Reply-To: <20170327174223.24317-1-jferlan@redhat.com> References: <20170327174223.24317-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/4] virsh.pod: Move the positional --print-xml for pool-{define|create}-as X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 27 Mar 2017 17:42:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Move the --print-xml to the end of the qualifiers since it's not properly positionally situated for both --pool-create-as and --pool-define-= as and could be miscontrued as being the 3rd positional argument. Signed-off-by: John Ferlan --- tools/virsh.pod | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 7fa7985..43124ba 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -3583,13 +3583,13 @@ follow-up command to build the pool. The I<--overwr= ite> and I<--no-overwrite> flags follow the same rules as B. If just I<--build> is provided, then B is called with no flags. =20 -=3Ditem B I I [I<--print-xml>] +=3Ditem B I I [I<--source-host hostname>] [I<--source-path path>] [I<--source-dev path>] [I<--source-name name>] [I<--target path>] [I<--source-format format>] [I<--auth-type authtype> I<--auth-username username> I<--secret-usage usag= e>] [[I<--adapter-name name>] | [I<--adapter-wwnn> I<--adapter-wwpn>] [I<--adapter-parent parent>]] -[I<--build>] [[I<--overwrite>] | [I<--no-overwrite>]] +[I<--build>] [[I<--overwrite>] | [I<--no-overwrite>]] [I<--print-xml>] =20 =20 Create and start a pool object I from the raw parameters. If @@ -3644,12 +3644,12 @@ just I<--build> is provided, then B is = called with no flags. Define an inactive persistent storage pool or modify an existing persisten= t one from the XML I. =20 -=3Ditem B I I [I<--print-xml>] +=3Ditem B I I [I<--source-host hostname>] [I<--source-path path>] [I<--source-dev path>] [I<--source-name name>] [I<--target path>] [I<--source-format format>] [I<--auth-type authtype> I<--auth-username username> I<--secret-usage usag= e>] [[I<--adapter-name name>] | [I<--adapter-wwnn> I<--adapter-wwpn>] -[I<--adapter-parent parent>]] +[I<--adapter-parent parent>]] [I<--print-xml>] =20 Create, but do not start, a pool object I from the raw parameters. = If I<--print-xml> is specified, then print the XML of the pool object --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 00:21:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1490636553579942.3302654057195; Mon, 27 Mar 2017 10:42:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 43A7A64A64; Mon, 27 Mar 2017 17:42:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1942317108; Mon, 27 Mar 2017 17:42:32 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B7CA418523C7; Mon, 27 Mar 2017 17:42:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2RHgT7l028523 for ; Mon, 27 Mar 2017 13:42:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1B0F48071E; Mon, 27 Mar 2017 17:42:29 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id CAEA318A34 for ; Mon, 27 Mar 2017 17:42:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 43A7A64A64 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 43A7A64A64 From: John Ferlan To: libvir-list@redhat.com Date: Mon, 27 Mar 2017 13:42:22 -0400 Message-Id: <20170327174223.24317-4-jferlan@redhat.com> In-Reply-To: <20170327174223.24317-1-jferlan@redhat.com> References: <20170327174223.24317-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/4] storage: Better describe logical pool creation/definition parameters X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 27 Mar 2017 17:42:32 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.redhat.com/show_bug.cgi?id=3D1398087 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. Also modify the storage pool XML parsing algorithm to check for the mismatched "name" and "source-name". Signed-off-by: John Ferlan --- src/conf/storage_conf.c | 8 ++++++++ tools/virsh.pod | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 585ca71..5213503 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -760,6 +760,14 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt) if (VIR_STRDUP(ret->source.name, ret->name) < 0) goto error; } + if (ret->type =3D=3D VIR_STORAGE_POOL_LOGICAL && + STRNEQ(ret->name, ret->source.name)) { + virReportError(VIR_ERR_XML_ERROR, + _("for a logical pool, the pool name=3D'%s'= " + "must match the pool source name=3D'%s'"), + ret->name, ret->source.name); + goto error; + } } =20 if ((options->flags & VIR_STORAGE_POOL_SOURCE_ADAPTER) && diff --git a/tools/virsh.pod b/tools/virsh.pod index 43124ba..55b71a9 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -3639,6 +3639,13 @@ follow-up command to build the pool. The I<--overwri= te> and I<--no-overwrite> flags follow the same rules as B. If just I<--build> is provided, then B is called with no flags. =20 +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>]). + =3Ditem B I =20 Define an inactive persistent storage pool or modify an existing persisten= t one --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 00:21:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1490636559665671.6429908424396; Mon, 27 Mar 2017 10:42:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8371D64D8F; Mon, 27 Mar 2017 17:42:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 52D4C17108; Mon, 27 Mar 2017 17:42:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E7CCC4ED27; Mon, 27 Mar 2017 17:42:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2RHgTsG028528 for ; Mon, 27 Mar 2017 13:42:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 98D4C18A34; Mon, 27 Mar 2017 17:42:29 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55D628071E for ; Mon, 27 Mar 2017 17:42:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8371D64D8F Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8371D64D8F From: John Ferlan To: libvir-list@redhat.com Date: Mon, 27 Mar 2017 13:42:23 -0400 Message-Id: <20170327174223.24317-5-jferlan@redhat.com> In-Reply-To: <20170327174223.24317-1-jferlan@redhat.com> References: <20170327174223.24317-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 4/4] docs: Add news article for logical pool-create-as X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 27 Mar 2017 17:42:39 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: John Ferlan --- docs/news.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index a772799..29b3546 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -700,6 +700,11 @@ logical: Need to overwrite/clear more than just first 512 bytes + + + Describe the logical backend requirements better for pool-create= -as + + --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list