From nobody Sat May 4 10:28:14 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.zohomail.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 1507130256788251.94756993501665; Wed, 4 Oct 2017 08:17:36 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1226780CD; Wed, 4 Oct 2017 15:17:35 +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 47B975D96C; Wed, 4 Oct 2017 15:17:35 +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 5D6F718355C3; Wed, 4 Oct 2017 15:17:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v94Euuiv006390 for ; Wed, 4 Oct 2017 10:56:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8CD1160F81; Wed, 4 Oct 2017 14:56:56 +0000 (UTC) Received: from localhost.com (ovpn-117-80.phx2.redhat.com [10.3.117.80]) by smtp.corp.redhat.com (Postfix) with ESMTP id 32B7A619CA for ; Wed, 4 Oct 2017 14:56:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A1226780CD Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: John Ferlan To: libvir-list@redhat.com Date: Wed, 4 Oct 2017 10:55:58 -0400 Message-Id: <20171004145558.12576-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2] docs, rng: Adjust storage pool name grammar checks 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 04 Oct 2017 15:17:36 +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=3D1475250 It's possible to define and start a pool with a '.' in the name; however, when trying to add a volume to a domain using the storage pool source with a '.' in the storage pool name, the domain RNG validation fails because RNG uses 'genericName' which does not allow a '.' in the name. Domain XML def parsing has a virXMLValidateAgainstSchema which generates the error. The Storage Pool XML def parsing has no call to virXMLValidateAgainstSchema. The only Storage Pool name validation occurs in virStoragePoolDefParseXML to ensure the name doesn't have a '/' in it and in storagePoolDefineXML to call virXMLCheckIllegalChars using the same parameter "\n" as qemuDomainDefineXMLFlags would check after the RNG check could be succesful. In order to resolve this, create a poolName definition in storagecommon.rng that will mimic the domain name regex that disallows a newline character, but add the "/" in the exclude list. Then modify the pool and volume source name definitions to key off that poolName. Signed-off-by: John Ferlan --- v1: https://www.redhat.com/archives/libvir-list/2017-September/msg01037.ht= ml Change only to add '/' before the newline in poolName docs/schemas/domaincommon.rng | 2 +- docs/schemas/storagecommon.rng | 8 ++++++++ docs/schemas/storagepool.rng | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index bac371ea3..89515564f 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1674,7 +1674,7 @@ - + diff --git a/docs/schemas/storagecommon.rng b/docs/schemas/storagecommon.rng index 717f3c603..edee1b084 100644 --- a/docs/schemas/storagecommon.rng +++ b/docs/schemas/storagecommon.rng @@ -6,6 +6,14 @@ =20 + + + + [^/ +]+ + + + diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng index f0117bd69..52b2044be 100644 --- a/docs/schemas/storagepool.rng +++ b/docs/schemas/storagepool.rng @@ -209,7 +209,7 @@ - + @@ -223,7 +223,7 @@ - + --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list