From nobody Mon Feb 9 03:45:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) client-ip=209.132.183.37; envelope-from=libvir-list-bounces@redhat.com; helo=mx5-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) by mx.zohomail.com with SMTPS id 1489180451256674.9785115082078; Fri, 10 Mar 2017 13:14:11 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2ALAuDU044631; Fri, 10 Mar 2017 16:10:56 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2ALAtUL023886 for ; Fri, 10 Mar 2017 16:10:55 -0500 Received: from localhost.localdomain.com (ovpn-117-9.phx2.redhat.com [10.3.117.9]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2ALArRh011410 for ; Fri, 10 Mar 2017 16:10:54 -0500 From: John Ferlan To: libvir-list@redhat.com Date: Fri, 10 Mar 2017 16:10:33 -0500 Message-Id: <20170310211050.27784-2-jferlan@redhat.com> In-Reply-To: <20170310211050.27784-1-jferlan@redhat.com> References: <20170310211050.27784-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 01/18] conf: Ensure both parent_wwnn/parent_wwpn provided 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.redhat.com/show_bug.cgi?id=3D1428209 Commit id 'bb74a7ffe' neglected to check that both the parent_wwnn parent_wwpn are in the XML if one or the other is similar to how the node device code checked (commit id '2b13361bc'). If only one is provided, the "default" is to use a vHBA capable adapter (see commit id '78be2e8b'), so the vHBA could start, but perhaps not on the expected adapter. Signed-off-by: John Ferlan --- src/conf/storage_conf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index a52eeba..e4d89dd 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -941,6 +941,17 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt) if (!virValidateWWN(ret->source.adapter.data.fchost.wwnn) || !virValidateWWN(ret->source.adapter.data.fchost.wwpn)) goto error; + + if ((ret->source.adapter.data.fchost.parent_wwnn && + !ret->source.adapter.data.fchost.parent_wwpn) || + (!ret->source.adapter.data.fchost.parent_wwnn && + ret->source.adapter.data.fchost.parent_wwpn)) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("must supply both parent_wwnn and " + "parent_wwpn not just one or the other")); + goto error; + } + } else if (ret->source.adapter.type =3D=3D VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_SCSI_HOST) { if (!ret->source.adapter.data.scsi_host.name && --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list