From nobody Fri May 3 18:19:15 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 15101469767321006.876995388342; Wed, 8 Nov 2017 05:16:16 -0800 (PST) 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 E1EE781DFB; Wed, 8 Nov 2017 13:16:14 +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 8A1845D6A9; Wed, 8 Nov 2017 13:16:14 +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 BA9AC1808872; Wed, 8 Nov 2017 13:16:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA8DGBeh020527 for ; Wed, 8 Nov 2017 08:16:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9291F6BF80; Wed, 8 Nov 2017 13:16:11 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-90.phx2.redhat.com [10.3.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 56B0B6BF87 for ; Wed, 8 Nov 2017 13:16:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E1EE781DFB Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.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, 8 Nov 2017 08:15:54 -0500 Message-Id: <20171108131601.26985-2-jferlan@redhat.com> In-Reply-To: <20171108131601.26985-1-jferlan@redhat.com> References: <20171108131601.26985-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [REPOST PATCH v6 1/8] conf, qemu: Replace iscsisrc fields with virStorageSourcePtr 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.25]); Wed, 08 Nov 2017 13:16:15 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Rather than picking apart the two pieces we need/want (path, hosts, and auth)- let's allocate/use a virStorageSourcePtr for iSCSI storage. The end result is that qemuBuildSCSIiSCSIHostdevDrvStr doesn't need to "fake" one for the qemuBuildNetworkDriveStr call. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 46 +++++++++++++++++++++++++--------------------- src/conf/domain_conf.h | 5 +---- src/qemu/qemu_command.c | 10 +--------- src/qemu/qemu_domain.c | 9 +++++---- src/qemu/qemu_hotplug.c | 2 +- 5 files changed, 33 insertions(+), 39 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7dfd7b54e6..32b4cc9da9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2480,10 +2480,9 @@ virDomainHostdevSubsysSCSIiSCSIClear(virDomainHostde= vSubsysSCSIiSCSIPtr iscsisrc { if (!iscsisrc) return; - VIR_FREE(iscsisrc->path); - virStorageNetHostDefFree(iscsisrc->nhosts, iscsisrc->hosts); - virStorageAuthDefFree(iscsisrc->auth); - iscsisrc->auth =3D NULL; + + virStorageSourceFree(iscsisrc->src); + iscsisrc->src =3D NULL; } =20 =20 @@ -4357,7 +4356,7 @@ virDomainHostdevDefPostParse(virDomainHostdevDefPtr d= ev, if (scsisrc->protocol =3D=3D VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE= _ISCSI) { virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &scsisrc->u.is= csi; =20 - if (virDomainPostParseCheckISCSIPath(&iscsisrc->path) < 0) + if (virDomainPostParseCheckISCSIPath(&iscsisrc->src->path) < 0) return -1; } =20 @@ -7123,24 +7122,29 @@ virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodeP= tr sourcenode, virStorageAuthDefPtr authdef =3D NULL; virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &def->u.iscsi; =20 - /* Similar to virDomainDiskSourceParse for a VIR_STORAGE_TYPE_NETWORK = */ + /* For the purposes of command line creation, this needs to look + * like a disk storage source */ + if (VIR_ALLOC(iscsisrc->src) < 0) + return -1; + iscsisrc->src->type =3D VIR_STORAGE_TYPE_NETWORK; + iscsisrc->src->protocol =3D VIR_STORAGE_NET_PROTOCOL_ISCSI; =20 - if (!(iscsisrc->path =3D virXMLPropString(sourcenode, "name"))) { + if (!(iscsisrc->src->path =3D virXMLPropString(sourcenode, "name"))) { virReportError(VIR_ERR_XML_ERROR, "%s", _("missing iSCSI hostdev source path name")); goto cleanup; } =20 - if (virDomainStorageNetworkParseHosts(sourcenode, &iscsisrc->hosts, - &iscsisrc->nhosts) < 0) + if (virDomainStorageNetworkParseHosts(sourcenode, &iscsisrc->src->host= s, + &iscsisrc->src->nhosts) < 0) goto cleanup; =20 - if (iscsisrc->nhosts < 1) { + if (iscsisrc->src->nhosts < 1) { virReportError(VIR_ERR_XML_ERROR, "%s", _("missing the host address for the iSCSI hostdev")= ); goto cleanup; } - if (iscsisrc->nhosts > 1) { + if (iscsisrc->src->nhosts > 1) { virReportError(VIR_ERR_XML_ERROR, "%s", _("only one source host address may be specified " "for the iSCSI hostdev")); @@ -7166,7 +7170,7 @@ virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodePtr= sourcenode, authdef->secrettype); goto cleanup; } - iscsisrc->auth =3D authdef; + iscsisrc->src->auth =3D authdef; authdef =3D NULL; } cur =3D cur->next; @@ -15677,9 +15681,9 @@ virDomainHostdevMatchSubsysSCSIiSCSI(virDomainHostd= evDefPtr first, virDomainHostdevSubsysSCSIiSCSIPtr second_iscsisrc =3D &second->source.subsys.u.scsi.u.iscsi; =20 - if (STREQ(first_iscsisrc->hosts[0].name, second_iscsisrc->hosts[0].nam= e) && - first_iscsisrc->hosts[0].port =3D=3D second_iscsisrc->hosts[0].por= t && - STREQ(first_iscsisrc->path, second_iscsisrc->path)) + if (STREQ(first_iscsisrc->src->hosts[0].name, second_iscsisrc->src->ho= sts[0].name) && + first_iscsisrc->src->hosts[0].port =3D=3D second_iscsisrc->src->ho= sts[0].port && + STREQ(first_iscsisrc->src->path, second_iscsisrc->src->path)) return 1; return 0; } @@ -23028,7 +23032,7 @@ virDomainHostdevDefFormatSubsys(virBufferPtr buf, virDomainHostdevSubsysSCSIProtocolTypeToString(scsisrc->protoc= ol); =20 virBufferAsprintf(buf, " protocol=3D'%s' name=3D'%s'", - protocol, iscsisrc->path); + protocol, iscsisrc->src->path); } =20 if (def->source.subsys.type =3D=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI= _HOST) { @@ -23080,9 +23084,9 @@ virDomainHostdevDefFormatSubsys(virBufferPtr buf, case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI: if (scsisrc->protocol =3D=3D VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE= _ISCSI) { virBufferAddLit(buf, "hosts[0].= name); - if (iscsisrc->hosts[0].port) - virBufferAsprintf(buf, " port=3D'%u'", iscsisrc->hosts[0].= port); + virBufferEscapeString(buf, " name=3D'%s'", iscsisrc->src->host= s[0].name); + if (iscsisrc->src->hosts[0].port) + virBufferAsprintf(buf, " port=3D'%u'", iscsisrc->src->host= s[0].port); virBufferAddLit(buf, "/>\n"); } else { virBufferAsprintf(buf, "\n", @@ -23109,8 +23113,8 @@ virDomainHostdevDefFormatSubsys(virBufferPtr buf, =20 if (def->source.subsys.type =3D=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI= && scsisrc->protocol =3D=3D VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISC= SI && - iscsisrc->auth) { - if (virStorageAuthDefFormat(buf, iscsisrc->auth) < 0) + iscsisrc->src->auth) { + if (virStorageAuthDefFormat(buf, iscsisrc->src->auth) < 0) return -1; } =20 diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index e3f060b122..c5a8d9b99a 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -357,10 +357,7 @@ struct _virDomainHostdevSubsysSCSIHost { typedef struct _virDomainHostdevSubsysSCSIiSCSI virDomainHostdevSubsysSCSI= iSCSI; typedef virDomainHostdevSubsysSCSIiSCSI *virDomainHostdevSubsysSCSIiSCSIPt= r; struct _virDomainHostdevSubsysSCSIiSCSI { - char *path; - size_t nhosts; - virStorageNetHostDefPtr hosts; - virStorageAuthDefPtr auth; + virStorageSourcePtr src; }; =20 typedef struct _virDomainHostdevSubsysSCSI virDomainHostdevSubsysSCSI; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3641967839..dc92fe9c7a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4895,21 +4895,13 @@ static char * qemuBuildSCSIiSCSIHostdevDrvStr(virDomainHostdevDefPtr dev) { char *source =3D NULL; - virStorageSource src; qemuDomainHostdevPrivatePtr hostdevPriv =3D QEMU_DOMAIN_HOSTDEV_PRIVAT= E(dev); =20 - memset(&src, 0, sizeof(src)); - virDomainHostdevSubsysSCSIPtr scsisrc =3D &dev->source.subsys.u.scsi; virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &scsisrc->u.iscsi; =20 - src.protocol =3D VIR_STORAGE_NET_PROTOCOL_ISCSI; - src.path =3D iscsisrc->path; - src.hosts =3D iscsisrc->hosts; - src.nhosts =3D iscsisrc->nhosts; - /* Rather than pull what we think we want - use the network disk code = */ - source =3D qemuBuildNetworkDriveStr(&src, hostdevPriv->secinfo); + source =3D qemuBuildNetworkDriveStr(iscsisrc->src, hostdevPriv->secinf= o); =20 return source; } diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 7024635470..1abba02e42 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1490,9 +1490,10 @@ qemuDomainSecretHostdevPrepare(virConnectPtr conn, if (virHostdevIsSCSIDevice(hostdev)) { virDomainHostdevSubsysSCSIPtr scsisrc =3D &hostdev->source.subsys.= u.scsi; virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &scsisrc->u.iscsi; + virStorageSourcePtr src =3D iscsisrc->src; =20 if (scsisrc->protocol =3D=3D VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE= _ISCSI && - iscsisrc->auth) { + src->auth) { =20 qemuDomainHostdevPrivatePtr hostdevPriv =3D QEMU_DOMAIN_HOSTDEV_PRIVATE(hostdev); @@ -1500,8 +1501,8 @@ qemuDomainSecretHostdevPrepare(virConnectPtr conn, if (!(hostdevPriv->secinfo =3D qemuDomainSecretInfoNew(conn, priv, hostdev->info->alias, VIR_SECRET_USAGE_TYPE_ISCSI, - iscsisrc->auth->username, - &iscsisrc->auth->seclookupdef, + src->auth->username, + &src->auth->seclookupdef, false))) return -1; } @@ -8157,7 +8158,7 @@ qemuDomainGetHostdevPath(virDomainDefPtr def, /* Follow qemuSetupDiskCgroup() and qemuSetImageCgroupInte= rnal() * which does nothing for non local storage */ - VIR_DEBUG("Not updating /dev for hostdev iSCSI path '%s'",= iscsisrc->path); + VIR_DEBUG("Not updating /dev for hostdev iSCSI path '%s'",= iscsisrc->src->path); } else { virDomainHostdevSubsysSCSIHostPtr scsihostsrc =3D &scsisrc= ->u.host; scsi =3D virSCSIDeviceNew(NULL, diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index ce63b4a4d9..bc1c025e6f 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -4888,7 +4888,7 @@ int qemuDomainDetachHostDevice(virQEMUDriverPtr drive= r, virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &scsisrc->= u.iscsi; virReportError(VIR_ERR_OPERATION_FAILED, _("host scsi iSCSI path %s not found"), - iscsisrc->path); + iscsisrc->src->path); } else { virDomainHostdevSubsysSCSIHostPtr scsihostsrc =3D &scsisrc->u.host; --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 18:19:15 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 151014699609590.0391036449862; Wed, 8 Nov 2017 05:16:36 -0800 (PST) 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 2D7AF82111; Wed, 8 Nov 2017 13:16:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 094915EDF7; Wed, 8 Nov 2017 13:16:34 +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 CB2173D381; Wed, 8 Nov 2017 13:16:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA8DGCbG020538 for ; Wed, 8 Nov 2017 08:16:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id F29D060634; Wed, 8 Nov 2017 13:16:11 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-90.phx2.redhat.com [10.3.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id B68086BF82 for ; Wed, 8 Nov 2017 13:16:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2D7AF82111 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=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: John Ferlan To: libvir-list@redhat.com Date: Wed, 8 Nov 2017 08:15:55 -0500 Message-Id: <20171108131601.26985-3-jferlan@redhat.com> In-Reply-To: <20171108131601.26985-1-jferlan@redhat.com> References: <20171108131601.26985-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [REPOST PATCH v6 2/8] qemu: Use private storage source for iscsi instead of private hostdev 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]); Wed, 08 Nov 2017 13:16:34 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Rather than placing/using privateData about secinfo in the hostdev, let's use the virStorageSource private data instead. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 7 ++++--- src/qemu/qemu_domain.c | 24 ++++++++++++++++-------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index dc92fe9c7a..70a389f2a3 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4895,13 +4895,14 @@ static char * qemuBuildSCSIiSCSIHostdevDrvStr(virDomainHostdevDefPtr dev) { char *source =3D NULL; - qemuDomainHostdevPrivatePtr hostdevPriv =3D QEMU_DOMAIN_HOSTDEV_PRIVAT= E(dev); - virDomainHostdevSubsysSCSIPtr scsisrc =3D &dev->source.subsys.u.scsi; virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &scsisrc->u.iscsi; + qemuDomainStorageSourcePrivatePtr srcPriv =3D + QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(iscsisrc->src); =20 /* Rather than pull what we think we want - use the network disk code = */ - source =3D qemuBuildNetworkDriveStr(iscsisrc->src, hostdevPriv->secinf= o); + source =3D qemuBuildNetworkDriveStr(iscsisrc->src, srcPriv ? + srcPriv->secinfo : NULL); =20 return source; } diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 1abba02e42..31ec91fa12 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1463,13 +1463,18 @@ qemuDomainSecretDiskPrepare(virConnectPtr conn, void qemuDomainSecretHostdevDestroy(virDomainHostdevDefPtr hostdev) { - qemuDomainHostdevPrivatePtr hostdevPriv =3D - QEMU_DOMAIN_HOSTDEV_PRIVATE(hostdev); + qemuDomainStorageSourcePrivatePtr srcPriv; =20 - if (!hostdevPriv || !hostdevPriv->secinfo) - return; + if (virHostdevIsSCSIDevice(hostdev)) { + virDomainHostdevSubsysSCSIPtr scsisrc =3D &hostdev->source.subsys.= u.scsi; + virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &scsisrc->u.iscsi; =20 - qemuDomainSecretInfoFree(&hostdevPriv->secinfo); + if (scsisrc->protocol =3D=3D VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE= _ISCSI) { + srcPriv =3D QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(iscsisrc->src); + if (srcPriv && srcPriv->secinfo) + qemuDomainSecretInfoFree(&srcPriv->secinfo); + } + } } =20 =20 @@ -1491,14 +1496,17 @@ qemuDomainSecretHostdevPrepare(virConnectPtr conn, virDomainHostdevSubsysSCSIPtr scsisrc =3D &hostdev->source.subsys.= u.scsi; virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &scsisrc->u.iscsi; virStorageSourcePtr src =3D iscsisrc->src; + qemuDomainStorageSourcePrivatePtr srcPriv; =20 if (scsisrc->protocol =3D=3D VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE= _ISCSI && src->auth) { =20 - qemuDomainHostdevPrivatePtr hostdevPriv =3D - QEMU_DOMAIN_HOSTDEV_PRIVATE(hostdev); + if (!(src->privateData =3D qemuDomainStorageSourcePrivateNew()= )) + return -1; + + srcPriv =3D QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(src); =20 - if (!(hostdevPriv->secinfo =3D + if (!(srcPriv->secinfo =3D qemuDomainSecretInfoNew(conn, priv, hostdev->info->alias, VIR_SECRET_USAGE_TYPE_ISCSI, src->auth->username, --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 18:19:15 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 1510146976734335.3637566326762; Wed, 8 Nov 2017 05:16:16 -0800 (PST) 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 0FC3BC04AC5B; Wed, 8 Nov 2017 13:16:15 +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 953DC60634; Wed, 8 Nov 2017 13:16:14 +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 15FE51800BD3; Wed, 8 Nov 2017 13:16:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA8DGCck020562 for ; Wed, 8 Nov 2017 08:16:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5DED260634; Wed, 8 Nov 2017 13:16:12 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-90.phx2.redhat.com [10.3.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2257B6BF80 for ; Wed, 8 Nov 2017 13:16:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0FC3BC04AC5B 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=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: John Ferlan To: libvir-list@redhat.com Date: Wed, 8 Nov 2017 08:15:56 -0500 Message-Id: <20171108131601.26985-4-jferlan@redhat.com> In-Reply-To: <20171108131601.26985-1-jferlan@redhat.com> References: <20171108131601.26985-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [REPOST PATCH v6 3/8] qemu: Remove private hostdev 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]); Wed, 08 Nov 2017 13:16:15 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since it's not longer used to shuttle the @secinfo, let's remove the private hostdev completely. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 12 ++---------- src/conf/domain_conf.h | 4 +--- src/lxc/lxc_native.c | 2 +- src/qemu/qemu_domain.c | 44 ---------------------------------------= ---- src/qemu/qemu_domain.h | 14 -------------- src/qemu/qemu_parse_command.c | 4 ++-- src/vbox/vbox_common.c | 2 +- src/xenconfig/xen_common.c | 2 +- src/xenconfig/xen_sxpr.c | 2 +- src/xenconfig/xen_xl.c | 2 +- tests/virhostdevtest.c | 2 +- 11 files changed, 11 insertions(+), 79 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 32b4cc9da9..9641295c57 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2451,7 +2451,7 @@ void virDomainVideoDefFree(virDomainVideoDefPtr def) =20 =20 virDomainHostdevDefPtr -virDomainHostdevDefNew(virDomainXMLOptionPtr xmlopt) +virDomainHostdevDefNew(void) { virDomainHostdevDefPtr def; =20 @@ -2461,11 +2461,6 @@ virDomainHostdevDefNew(virDomainXMLOptionPtr xmlopt) if (VIR_ALLOC(def->info) < 0) goto error; =20 - if (xmlopt && - xmlopt->privateData.hostdevNew && - !(def->privateData =3D xmlopt->privateData.hostdevNew())) - goto error; - return def; =20 error: @@ -2544,9 +2539,6 @@ void virDomainHostdevDefClear(virDomainHostdevDefPtr = def) } break; } - - virObjectUnref(def->privateData); - def->privateData =3D NULL; } =20 void virDomainTPMDefFree(virDomainTPMDefPtr def) @@ -14683,7 +14675,7 @@ virDomainHostdevDefParseXML(virDomainXMLOptionPtr x= mlopt, =20 ctxt->node =3D node; =20 - if (!(def =3D virDomainHostdevDefNew(xmlopt))) + if (!(def =3D virDomainHostdevDefNew())) goto error; =20 if (mode) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index c5a8d9b99a..5d01bb70d4 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -439,7 +439,6 @@ struct _virDomainHostdevCaps { /* basic device for direct passthrough */ struct _virDomainHostdevDef { virDomainDeviceDef parent; /* higher level Def containing this */ - virObjectPtr privateData; =20 int mode; /* enum virDomainHostdevMode */ int startupPolicy; /* enum virDomainStartupPolicy */ @@ -2607,7 +2606,6 @@ struct _virDomainXMLPrivateDataCallbacks { /* note that private data for devices are not copied when using * virDomainDefCopy and similar functions */ virDomainXMLPrivateDataNewFunc diskNew; - virDomainXMLPrivateDataNewFunc hostdevNew; virDomainXMLPrivateDataNewFunc vcpuNew; virDomainXMLPrivateDataNewFunc chrSourceNew; virDomainXMLPrivateDataFormatFunc format; @@ -2732,7 +2730,7 @@ void virDomainNVRAMDefFree(virDomainNVRAMDefPtr def); void virDomainWatchdogDefFree(virDomainWatchdogDefPtr def); virDomainVideoDefPtr virDomainVideoDefNew(void); void virDomainVideoDefFree(virDomainVideoDefPtr def); -virDomainHostdevDefPtr virDomainHostdevDefNew(virDomainXMLOptionPtr xmlopt= ); +virDomainHostdevDefPtr virDomainHostdevDefNew(void); void virDomainHostdevDefClear(virDomainHostdevDefPtr def); void virDomainHostdevDefFree(virDomainHostdevDefPtr def); void virDomainHubDefFree(virDomainHubDefPtr def); diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c index 68636dc2a4..fdc03a57ea 100644 --- a/src/lxc/lxc_native.c +++ b/src/lxc/lxc_native.c @@ -394,7 +394,7 @@ lxcCreateNetDef(const char *type, static virDomainHostdevDefPtr lxcCreateHostdevDef(int mode, int type, const char *data) { - virDomainHostdevDefPtr hostdev =3D virDomainHostdevDefNew(NULL); + virDomainHostdevDefPtr hostdev =3D virDomainHostdevDefNew(); =20 if (!hostdev) return NULL; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 31ec91fa12..66fa069b6f 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -965,49 +965,6 @@ qemuDomainStorageSourcePrivateDispose(void *obj) } =20 =20 -static virClassPtr qemuDomainHostdevPrivateClass; -static void qemuDomainHostdevPrivateDispose(void *obj); - -static int -qemuDomainHostdevPrivateOnceInit(void) -{ - qemuDomainHostdevPrivateClass =3D - virClassNew(virClassForObject(), - "qemuDomainHostdevPrivate", - sizeof(qemuDomainHostdevPrivate), - qemuDomainHostdevPrivateDispose); - if (!qemuDomainHostdevPrivateClass) - return -1; - else - return 0; -} - -VIR_ONCE_GLOBAL_INIT(qemuDomainHostdevPrivate) - -static virObjectPtr -qemuDomainHostdevPrivateNew(void) -{ - qemuDomainHostdevPrivatePtr priv; - - if (qemuDomainHostdevPrivateInitialize() < 0) - return NULL; - - if (!(priv =3D virObjectNew(qemuDomainHostdevPrivateClass))) - return NULL; - - return (virObjectPtr) priv; -} - - -static void -qemuDomainHostdevPrivateDispose(void *obj) -{ - qemuDomainHostdevPrivatePtr priv =3D obj; - - qemuDomainSecretInfoFree(&priv->secinfo); -} - - static virClassPtr qemuDomainVcpuPrivateClass; static void qemuDomainVcpuPrivateDispose(void *obj); =20 @@ -2476,7 +2433,6 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivate= DataCallbacks =3D { .free =3D qemuDomainObjPrivateFree, .diskNew =3D qemuDomainDiskPrivateNew, .vcpuNew =3D qemuDomainVcpuPrivateNew, - .hostdevNew =3D qemuDomainHostdevPrivateNew, .chrSourceNew =3D qemuDomainChrSourcePrivateNew, .parse =3D qemuDomainObjPrivateXMLParse, .format =3D qemuDomainObjPrivateXMLFormat, diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index e021da51fc..f39fecbc52 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -376,10 +376,6 @@ struct _qemuDomainStorageSourcePrivate { =20 virObjectPtr qemuDomainStorageSourcePrivateNew(void); =20 -# define QEMU_DOMAIN_HOSTDEV_PRIVATE(hostdev) \ - ((qemuDomainHostdevPrivatePtr) (hostdev)->privateData) - - typedef struct _qemuDomainVcpuPrivate qemuDomainVcpuPrivate; typedef qemuDomainVcpuPrivate *qemuDomainVcpuPrivatePtr; struct _qemuDomainVcpuPrivate { @@ -414,16 +410,6 @@ struct qemuDomainDiskInfo { char *nodename; }; =20 -typedef struct _qemuDomainHostdevPrivate qemuDomainHostdevPrivate; -typedef qemuDomainHostdevPrivate *qemuDomainHostdevPrivatePtr; -struct _qemuDomainHostdevPrivate { - virObject parent; - - /* for hostdev storage devices using auth/secret - * NB: *not* to be written to qemu domain object XML */ - qemuDomainSecretInfoPtr secinfo; -}; - # define QEMU_DOMAIN_CHR_SOURCE_PRIVATE(dev) \ ((qemuDomainChrSourcePrivatePtr) (dev)->privateData) =20 diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c index 5333163850..5d5e44792d 100644 --- a/src/qemu/qemu_parse_command.c +++ b/src/qemu/qemu_parse_command.c @@ -1156,7 +1156,7 @@ qemuParseCommandLinePCI(const char *val) int bus =3D 0, slot =3D 0, func =3D 0; const char *start; char *end; - virDomainHostdevDefPtr def =3D virDomainHostdevDefNew(NULL); + virDomainHostdevDefPtr def =3D virDomainHostdevDefNew(); =20 if (!def) goto error; @@ -1206,7 +1206,7 @@ qemuParseCommandLinePCI(const char *val) static virDomainHostdevDefPtr qemuParseCommandLineUSB(const char *val) { - virDomainHostdevDefPtr def =3D virDomainHostdevDefNew(NULL); + virDomainHostdevDefPtr def =3D virDomainHostdevDefNew(); virDomainHostdevSubsysUSBPtr usbsrc; int first =3D 0, second =3D 0; const char *start; diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index a1d9b2e7d4..33aefabe5b 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -3034,7 +3034,7 @@ vboxHostDeviceGetXMLDesc(vboxDriverPtr data, virDomai= nDefPtr def, IMachine *mach goto release_filters; =20 for (i =3D 0; i < def->nhostdevs; i++) { - def->hostdevs[i] =3D virDomainHostdevDefNew(NULL); + def->hostdevs[i] =3D virDomainHostdevDefNew(); if (!def->hostdevs[i]) goto release_hostdevs; } diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 8fc24b24eb..ded0acab9d 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -458,7 +458,7 @@ xenParsePCI(virConfPtr conf, virDomainDefPtr def) goto skippci; if (virStrToLong_i(func, NULL, 16, &funcID) < 0) goto skippci; - if (!(hostdev =3D virDomainHostdevDefNew(NULL))) + if (!(hostdev =3D virDomainHostdevDefNew())) return -1; =20 hostdev->managed =3D false; diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c index 26af770713..e868c05695 100644 --- a/src/xenconfig/xen_sxpr.c +++ b/src/xenconfig/xen_sxpr.c @@ -1105,7 +1105,7 @@ xenParseSxprPCI(virDomainDefPtr def, goto error; } =20 - if (!(dev =3D virDomainHostdevDefNew(NULL))) + if (!(dev =3D virDomainHostdevDefNew())) goto error; =20 dev->mode =3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS; diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index a61f1d7d58..bf6c98c86b 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -733,7 +733,7 @@ xenParseXLUSB(virConfPtr conf, virDomainDefPtr def) goto skipusb; if (virStrToLong_i(device, NULL, 16, &devNum) < 0) goto skipusb; - if (!(hostdev =3D virDomainHostdevDefNew(NULL))) + if (!(hostdev =3D virDomainHostdevDefNew())) return -1; =20 hostdev->managed =3D false; diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c index 54aa470968..5b03cb6aee 100644 --- a/tests/virhostdevtest.c +++ b/tests/virhostdevtest.c @@ -88,7 +88,7 @@ myInit(void) =20 for (i =3D 0; i < nhostdevs; i++) { virDomainHostdevSubsys subsys; - hostdevs[i] =3D virDomainHostdevDefNew(NULL); + hostdevs[i] =3D virDomainHostdevDefNew(); if (!hostdevs[i]) goto cleanup; hostdevs[i]->mode =3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS; --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 18:19:15 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 1510146994702365.49039316474; Wed, 8 Nov 2017 05:16:34 -0800 (PST) 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 90CF680480; Wed, 8 Nov 2017 13:16:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B45A6A05C; Wed, 8 Nov 2017 13:16: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 37FD54BB79; Wed, 8 Nov 2017 13:16:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA8DGCL7020695 for ; Wed, 8 Nov 2017 08:16:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id BC1886A05C; Wed, 8 Nov 2017 13:16:12 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-90.phx2.redhat.com [10.3.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 80C7F60634 for ; Wed, 8 Nov 2017 13:16:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 90CF680480 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.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, 8 Nov 2017 08:15:57 -0500 Message-Id: <20171108131601.26985-5-jferlan@redhat.com> In-Reply-To: <20171108131601.26985-1-jferlan@redhat.com> References: <20171108131601.26985-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [REPOST PATCH v6 4/8] qemu: Refactor qemuBuildSCSIiSCSIHostdevDrvStr slightly 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.28]); Wed, 08 Nov 2017 13:16:33 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Rather than building the "file" string in qemuBuildSCSIHostdevDrvStr build it in the called helper. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 70a389f2a3..577c76b44b 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4895,15 +4895,22 @@ static char * qemuBuildSCSIiSCSIHostdevDrvStr(virDomainHostdevDefPtr dev) { char *source =3D NULL; + char *netsource =3D NULL; virDomainHostdevSubsysSCSIPtr scsisrc =3D &dev->source.subsys.u.scsi; virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &scsisrc->u.iscsi; qemuDomainStorageSourcePrivatePtr srcPriv =3D QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(iscsisrc->src); =20 /* Rather than pull what we think we want - use the network disk code = */ - source =3D qemuBuildNetworkDriveStr(iscsisrc->src, srcPriv ? - srcPriv->secinfo : NULL); + netsource =3D qemuBuildNetworkDriveStr(iscsisrc->src, srcPriv ? + srcPriv->secinfo : NULL); + if (!netsource) + goto cleanup; + if (virAsprintf(&source, "file=3D%s,if=3Dnone,format=3Draw", netsource= ) < 0) + goto cleanup; =20 + cleanup: + VIR_FREE(netsource); return source; } =20 @@ -4956,7 +4963,7 @@ qemuBuildSCSIHostdevDrvStr(virDomainHostdevDefPtr dev) if (scsisrc->protocol =3D=3D VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISC= SI) { if (!(source =3D qemuBuildSCSIiSCSIHostdevDrvStr(dev))) goto error; - virBufferAsprintf(&buf, "file=3D%s,if=3Dnone,format=3Draw", source= ); + virBufferAsprintf(&buf, "%s", source); } else { if (!(source =3D qemuBuildSCSIHostHostdevDrvStr(dev))) goto error; --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 18:19:15 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 1510146998543655.6111665737195; Wed, 8 Nov 2017 05:16:38 -0800 (PST) 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 0140F806BA; Wed, 8 Nov 2017 13:16: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 BC2F36BF79; Wed, 8 Nov 2017 13:16:36 +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 71F061804751; Wed, 8 Nov 2017 13:16:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA8DGDdJ020714 for ; Wed, 8 Nov 2017 08:16:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2696760634; Wed, 8 Nov 2017 13:16:13 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-90.phx2.redhat.com [10.3.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id DEB806A05C for ; Wed, 8 Nov 2017 13:16:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0140F806BA 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=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: John Ferlan To: libvir-list@redhat.com Date: Wed, 8 Nov 2017 08:15:58 -0500 Message-Id: <20171108131601.26985-6-jferlan@redhat.com> In-Reply-To: <20171108131601.26985-1-jferlan@redhat.com> References: <20171108131601.26985-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [REPOST PATCH v6 5/8] qemu: Get capabilities to use iscsi password-secret argument 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.26]); Wed, 08 Nov 2017 13:16:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add the capability to use the blockdev-add query-qmp-schema option to find the 'password-secret' parameter that will allow the iSCSI code to use the master secret object to encrypt the secret for an and only need to provide the object id of the secret on the command line thus obsfuscating the passphrase. Signed-off-by: John Ferlan --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.10.0-gicv2.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0-gicv3.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 + 10 files changed, 11 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7cb091056b..9d0c47fb2b 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -443,6 +443,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, /* 270 */ "vxhs", "virtio-blk.num-queues", + "iscsi.password-secret", ); =20 =20 @@ -1794,6 +1795,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSc= hemaQueries[] =3D { { "blockdev-add/arg-type/options/+gluster/debug-level", QEMU_CAPS_GLUS= TER_DEBUG_LEVEL}, { "blockdev-add/arg-type/+gluster/debug", QEMU_CAPS_GLUSTER_DEBUG_LEVE= L}, { "blockdev-add/arg-type/+vxhs", QEMU_CAPS_VXHS}, + { "blockdev-add/arg-type/+iscsi/password-secret", QEMU_CAPS_ISCSI_PASS= WORD_SECRET }, }; =20 struct virQEMUCapsObjectTypeProps { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index cacc2b77ed..a35cea361d 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -429,6 +429,7 @@ typedef enum { /* 270 */ QEMU_CAPS_VXHS, /* -drive file.driver=3Dvxhs via query-qmp-schema */ QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES, /* virtio-blk-*.num-queues */ + QEMU_CAPS_ISCSI_PASSWORD_SECRET, /* -drive file.driver=3Discsi,...,pas= sword-secret=3D */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.10.0-gicv2.aarch64.xml b/tes= ts/qemucapabilitiesdata/caps_2.10.0-gicv2.aarch64.xml index 9f9dceb684..06723819c0 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0-gicv2.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0-gicv2.aarch64.xml @@ -180,6 +180,7 @@ + 2010000 0 (v2.10.0) diff --git a/tests/qemucapabilitiesdata/caps_2.10.0-gicv3.aarch64.xml b/tes= ts/qemucapabilitiesdata/caps_2.10.0-gicv3.aarch64.xml index 3c2d2eed66..70f5a0d088 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0-gicv3.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0-gicv3.aarch64.xml @@ -180,6 +180,7 @@ + 2010000 0 (v2.10.0) diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml b/tests/qemuc= apabilitiesdata/caps_2.10.0.ppc64.xml index 0dfa20726c..855afac058 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml @@ -177,6 +177,7 @@ + 2010000 0 (v2.10.0) diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.10.0.s390x.xml index 7e44652feb..b340f8f96b 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml @@ -141,6 +141,7 @@ + 2010000 0 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.10.0.x86_64.xml index ddbd8c32fa..9fb0515fdb 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml @@ -224,6 +224,7 @@ + 2010000 0 (v2.10.0) diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_2.9.0.ppc64.xml index 786cea8eab..e2bba89d40 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml @@ -173,6 +173,7 @@ + 2009000 0 (v2.9.0) diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.9.0.s390x.xml index 896ed503c3..4dc9ad5b56 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml @@ -138,6 +138,7 @@ + 2009000 0 diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.9.0.x86_64.xml index 05f9dc0308..0c6eb5046c 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -221,6 +221,7 @@ + 2009000 0 (v2.9.0) --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 18:19:15 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 1510146997212286.2536381726334; Wed, 8 Nov 2017 05:16:37 -0800 (PST) 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 A00D32C87; Wed, 8 Nov 2017 13:16: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 733B75D964; Wed, 8 Nov 2017 13:16: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 36C70180474D; Wed, 8 Nov 2017 13:16:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA8DGD84020719 for ; Wed, 8 Nov 2017 08:16:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 94C0860634; Wed, 8 Nov 2017 13:16:13 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-90.phx2.redhat.com [10.3.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 490F76BF82 for ; Wed, 8 Nov 2017 13:16:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A00D32C87 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, 8 Nov 2017 08:15:59 -0500 Message-Id: <20171108131601.26985-7-jferlan@redhat.com> In-Reply-To: <20171108131601.26985-1-jferlan@redhat.com> References: <20171108131601.26985-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [REPOST PATCH v6 6/8] qemu: Use secret objects to pass iSCSI passwords 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, 08 Nov 2017 13:16: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=3D1425757 The blockdev-add code provides a mechanism to sanely provide user and password-secret arguments for iscsi without placing them on the command line to be viewable by a 'ps -ef' type command or needing to create separate -iscsi devices for each disk/volume found. So modify the iSCSI command line building to check for the presence of the capability in order properly setup and use the domain master secret object to encrypt the password in a secret object and alter the parameters for the command line to utilize. Modify the xml2argvtest to exhibit the syntax for both disk and hostdev configurations. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 65 +++++++++++++++++-= ---- src/qemu/qemu_command.h | 3 +- src/qemu/qemu_domain.c | 4 ++ src/qemu/qemu_hotplug.c | 50 ++++++++++++++++- ...xml2argv-disk-drive-network-iscsi-auth-AES.args | 41 ++++++++++++++ ...uxml2argv-disk-drive-network-iscsi-auth-AES.xml | 43 ++++++++++++++ ...ml2argv-hostdev-scsi-virtio-iscsi-auth-AES.args | 45 +++++++++++++++ ...xml2argv-hostdev-scsi-virtio-iscsi-auth-AES.xml | 48 ++++++++++++++++ tests/qemuxml2argvtest.c | 10 ++++ 9 files changed, 292 insertions(+), 17 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-= iscsi-auth-AES.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-= iscsi-auth-AES.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio= -iscsi-auth-AES.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio= -iscsi-auth-AES.xml diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 577c76b44b..f0724223f2 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1451,7 +1451,8 @@ qemuDiskBusNeedsDeviceArg(int bus) * the legacy representation. */ static bool -qemuDiskSourceNeedsProps(virStorageSourcePtr src) +qemuDiskSourceNeedsProps(virStorageSourcePtr src, + virQEMUCapsPtr qemuCaps) { int actualType =3D virStorageSourceGetActualType(src); =20 @@ -1464,6 +1465,11 @@ qemuDiskSourceNeedsProps(virStorageSourcePtr src) src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_VXHS) return true; =20 + if (actualType =3D=3D VIR_STORAGE_TYPE_NETWORK && + src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_ISCSI && + virQEMUCapsGet(qemuCaps, QEMU_CAPS_ISCSI_PASSWORD_SECRET)) + return true; + return false; } =20 @@ -1507,7 +1513,7 @@ qemuBuildDriveSourceStr(virDomainDiskDefPtr disk, char *source =3D NULL; int ret =3D -1; =20 - if (qemuDiskSourceNeedsProps(disk->src) && + if (qemuDiskSourceNeedsProps(disk->src, qemuCaps) && !(srcprops =3D qemuDiskSourceGetProps(disk->src))) goto cleanup; =20 @@ -1573,7 +1579,9 @@ qemuBuildDriveSourceStr(virDomainDiskDefPtr disk, virBufferAsprintf(buf, "file.debug=3D%d,", cfg->glusterDebugLe= vel); } =20 - if (secinfo && secinfo->type =3D=3D VIR_DOMAIN_SECRET_INFO_TYPE_AES) { + if (secinfo && secinfo->type =3D=3D VIR_DOMAIN_SECRET_INFO_TYPE_AES && + disk->src->type =3D=3D VIR_STORAGE_TYPE_NETWORK && + disk->src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_RBD) { /* NB: If libvirt starts using the more modern option based * syntax to build the command line (e.g., "-drive driver=3Drb= d, * filename=3D%s,...") instead of the legacy model (e.g."-drive @@ -4892,22 +4900,36 @@ qemuBuildSCSIHostHostdevDrvStr(virDomainHostdevDefP= tr dev) } =20 static char * -qemuBuildSCSIiSCSIHostdevDrvStr(virDomainHostdevDefPtr dev) +qemuBuildSCSIiSCSIHostdevDrvStr(virDomainHostdevDefPtr dev, + virQEMUCapsPtr qemuCaps) { char *source =3D NULL; char *netsource =3D NULL; + virJSONValuePtr srcprops =3D NULL; virDomainHostdevSubsysSCSIPtr scsisrc =3D &dev->source.subsys.u.scsi; virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &scsisrc->u.iscsi; qemuDomainStorageSourcePrivatePtr srcPriv =3D QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(iscsisrc->src); =20 - /* Rather than pull what we think we want - use the network disk code = */ - netsource =3D qemuBuildNetworkDriveStr(iscsisrc->src, srcPriv ? - srcPriv->secinfo : NULL); - if (!netsource) - goto cleanup; - if (virAsprintf(&source, "file=3D%s,if=3Dnone,format=3Draw", netsource= ) < 0) - goto cleanup; + if (qemuDiskSourceNeedsProps(iscsisrc->src, qemuCaps)) { + if (!(srcprops =3D qemuDiskSourceGetProps(iscsisrc->src))) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("failed to build the backend props")); + goto cleanup; + } + + if (!(netsource =3D virQEMUBuildDriveCommandlineFromJSON(srcprops)= )) + goto cleanup; + if (virAsprintf(&source, "%s,if=3Dnone,format=3Draw", netsource) <= 0) + goto cleanup; + } else { + /* Rather than pull what we think we want - use the network disk c= ode */ + if (!(netsource =3D qemuBuildNetworkDriveStr(iscsisrc->src, srcPri= v ? + srcPriv->secinfo : NULL= ))) + goto cleanup; + if (virAsprintf(&source, "file=3D%s,if=3Dnone,format=3Draw", netso= urce) < 0) + goto cleanup; + } =20 cleanup: VIR_FREE(netsource); @@ -4953,7 +4975,8 @@ qemuBuildSCSIVHostHostdevDevStr(const virDomainDef *d= ef, } =20 char * -qemuBuildSCSIHostdevDrvStr(virDomainHostdevDefPtr dev) +qemuBuildSCSIHostdevDrvStr(virDomainHostdevDefPtr dev, + virQEMUCapsPtr qemuCaps) { virBuffer buf =3D VIR_BUFFER_INITIALIZER; char *source =3D NULL; @@ -4961,7 +4984,7 @@ qemuBuildSCSIHostdevDrvStr(virDomainHostdevDefPtr dev) virDomainHostdevSubsysSCSIPtr scsisrc =3D &dev->source.subsys.u.scsi; =20 if (scsisrc->protocol =3D=3D VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISC= SI) { - if (!(source =3D qemuBuildSCSIiSCSIHostdevDrvStr(dev))) + if (!(source =3D qemuBuildSCSIiSCSIHostdevDrvStr(dev, qemuCaps))) goto error; virBufferAsprintf(&buf, "%s", source); } else { @@ -5460,10 +5483,24 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd, /* SCSI */ if (virHostdevIsSCSIDevice(hostdev)) { if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SCSI_GENERIC)) { + virDomainHostdevSubsysSCSIPtr scsisrc =3D + &hostdev->source.subsys.u.scsi; char *drvstr; =20 + if (scsisrc->protocol =3D=3D VIR_DOMAIN_HOSTDEV_SCSI_PROTO= COL_TYPE_ISCSI) { + virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D + &scsisrc->u.iscsi; + qemuDomainStorageSourcePrivatePtr srcPriv =3D + QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(iscsisrc->src); + + if (qemuBuildDiskSecinfoCommandLine(cmd, srcPriv ? + srcPriv->secinfo : + NULL) < 0) + return -1; + } + virCommandAddArg(cmd, "-drive"); - if (!(drvstr =3D qemuBuildSCSIHostdevDrvStr(hostdev))) + if (!(drvstr =3D qemuBuildSCSIHostdevDrvStr(hostdev, qemuC= aps))) return -1; virCommandAddArg(cmd, drvstr); VIR_FREE(drvstr); diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 2bcfc6c707..9aeab4991b 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -151,7 +151,8 @@ char *qemuBuildUSBHostdevDevStr(const virDomainDef *def, virDomainHostdevDefPtr dev, virQEMUCapsPtr qemuCaps); =20 -char *qemuBuildSCSIHostdevDrvStr(virDomainHostdevDefPtr dev); +char *qemuBuildSCSIHostdevDrvStr(virDomainHostdevDefPtr dev, + virQEMUCapsPtr qemuCaps); =20 char *qemuBuildSCSIHostdevDevStr(const virDomainDef *def, virDomainHostdevDefPtr dev, diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 66fa069b6f..e320f109cd 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1184,9 +1184,13 @@ qemuDomainSecretSetup(virConnectPtr conn, virSecretLookupTypeDefPtr seclookupdef, bool isLuks) { + bool iscsiHasPS =3D virQEMUCapsGet(priv->qemuCaps, + QEMU_CAPS_ISCSI_PASSWORD_SECRET); + if (virCryptoHaveCipher(VIR_CRYPTO_CIPHER_AES256CBC) && virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_SECRET) && (usageType =3D=3D VIR_SECRET_USAGE_TYPE_CEPH || + (usageType =3D=3D VIR_SECRET_USAGE_TYPE_ISCSI && iscsiHasPS) || usageType =3D=3D VIR_SECRET_USAGE_TYPE_VOLUME || usageType =3D=3D VIR_SECRET_USAGE_TYPE_TLS)) { if (qemuDomainSecretAESSetup(conn, priv, secinfo, srcalias, diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index bc1c025e6f..2a7ab8ed2b 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2259,6 +2259,7 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn, virDomainHostdevDefPtr hostdev) { size_t i; + int rv; int ret =3D -1; qemuDomainObjPrivatePtr priv =3D vm->privateData; virErrorPtr orig_err; @@ -2269,6 +2270,12 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn, bool teardownlabel =3D false; bool teardowndevice =3D false; bool driveAdded =3D false; + bool secobjAdded =3D false; + virJSONValuePtr secobjProps =3D NULL; + virDomainHostdevSubsysSCSIPtr scsisrc =3D &hostdev->source.subsys.u.sc= si; + virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &scsisrc->u.iscsi; + qemuDomainStorageSourcePrivatePtr srcPriv; + qemuDomainSecretInfoPtr secinfo; =20 if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_SCSI_GENERIC)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -2309,7 +2316,14 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn, if (qemuDomainSecretHostdevPrepare(conn, priv, hostdev) < 0) goto cleanup; =20 - if (!(drvstr =3D qemuBuildSCSIHostdevDrvStr(hostdev))) + srcPriv =3D QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(iscsisrc->src); + secinfo =3D srcPriv->secinfo; + if (secinfo && secinfo->type =3D=3D VIR_DOMAIN_SECRET_INFO_TYPE_AES) { + if (qemuBuildSecretInfoProps(secinfo, &secobjProps) < 0) + goto cleanup; + } + + if (!(drvstr =3D qemuBuildSCSIHostdevDrvStr(hostdev, priv->qemuCaps))) goto cleanup; =20 if (!(drivealias =3D qemuAliasFromHostdev(hostdev))) @@ -2323,6 +2337,15 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn, =20 qemuDomainObjEnterMonitor(driver, vm); =20 + if (secobjProps) { + rv =3D qemuMonitorAddObject(priv->mon, "secret", secinfo->s.aes.al= ias, + secobjProps); + secobjProps =3D NULL; /* qemuMonitorAddObject consumes */ + if (rv < 0) + goto exit_monitor; + secobjAdded =3D true; + } + if (qemuMonitorAddDrive(priv->mon, drvstr) < 0) goto exit_monitor; driveAdded =3D true; @@ -2340,7 +2363,6 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn, ret =3D 0; =20 cleanup: - qemuDomainSecretHostdevDestroy(hostdev); if (ret < 0) { qemuHostdevReAttachSCSIDevices(driver, vm->def->name, &hostdev, 1); if (teardowncgroup && qemuTeardownHostdevCgroup(vm, hostdev) < 0) @@ -2352,6 +2374,8 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn, qemuDomainNamespaceTeardownHostdev(driver, vm, hostdev) < 0) VIR_WARN("Unable to remove host device from /dev"); } + qemuDomainSecretHostdevDestroy(hostdev); + virJSONValueFree(secobjProps); VIR_FREE(drivealias); VIR_FREE(drvstr); VIR_FREE(devstr); @@ -2364,6 +2388,8 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn, "qemuMonitorAddDevice", drvstr, devstr); } + if (secobjAdded) + ignore_value(qemuMonitorDelObject(priv->mon, secinfo->s.aes.alias)= ); ignore_value(qemuDomainObjExitMonitor(driver, vm)); virErrorRestore(&orig_err); =20 @@ -3822,6 +3848,7 @@ qemuDomainRemoveHostDevice(virQEMUDriverPtr driver, int ret =3D -1; qemuDomainObjPrivatePtr priv =3D vm->privateData; char *drivealias =3D NULL; + char *objAlias =3D NULL; bool is_vfio =3D false; =20 VIR_DEBUG("Removing host device %s from domain %p %s", @@ -3833,11 +3860,29 @@ qemuDomainRemoveHostDevice(virQEMUDriverPtr driver, } =20 if (hostdev->source.subsys.type =3D=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_= SCSI) { + virDomainHostdevSubsysSCSIPtr scsisrc =3D &hostdev->source.subsys.= u.scsi; + virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc =3D &scsisrc->u.iscsi; + if (!(drivealias =3D qemuAliasFromHostdev(hostdev))) goto cleanup; =20 + /* Look for the markers that the iSCSI hostdev was added with a + * secret object to manage the username/password. If present, let's + * attempt to remove the object as well. */ + if (scsisrc->protocol =3D=3D VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE= _ISCSI && + virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_ISCSI_PASSWORD_SECRET= ) && + qemuDomainSecretDiskCapable(iscsisrc->src)) { + if (!(objAlias =3D qemuDomainGetSecretAESAlias(hostdev->info->= alias, false))) + goto cleanup; + } + qemuDomainObjEnterMonitor(driver, vm); qemuMonitorDriveDel(priv->mon, drivealias); + + /* If it fails, then so be it - it was a best shot */ + if (objAlias) + ignore_value(qemuMonitorDelObject(priv->mon, objAlias)); + if (qemuDomainObjExitMonitor(driver, vm) < 0) goto cleanup; } @@ -3909,6 +3954,7 @@ qemuDomainRemoveHostDevice(virQEMUDriverPtr driver, =20 cleanup: VIR_FREE(drivealias); + VIR_FREE(objAlias); virObjectUnref(cfg); return ret; } diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-a= uth-AES.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi= -auth-AES.args new file mode 100644 index 0000000000..e31e8d857e --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth-AES= .args @@ -0,0 +1,41 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name QEMUGuest1 \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-M pc \ +-m 214 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-nographic \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-no-acpi \ +-boot c \ +-usb \ +-object secret,id=3Dvirtio-disk0-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-drive file.driver=3Discsi,file.portal=3Dexample.org:6000,\ +file.target=3Diqn.1992-01.com.example:storage,file.lun=3D1,file.transport= =3Dtcp,\ +file.user=3Dmyname,file.password-secret=3Dvirtio-disk0-secret0,format=3Dra= w,if=3Dnone,\ +id=3Ddrive-virtio-disk0 \ +-device virtio-blk-pci,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-virtio-disk0,\ +id=3Dvirtio-disk0 \ +-object secret,id=3Dvirtio-disk1-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-drive file.driver=3Discsi,file.portal=3Dexample.org:6000,\ +file.target=3Diqn.1992-01.com.example:storage,file.lun=3D2,file.transport= =3Dtcp,\ +file.user=3Dmyname,file.password-secret=3Dvirtio-disk1-secret0,format=3Dra= w,if=3Dnone,\ +id=3Ddrive-virtio-disk1 \ +-device virtio-blk-pci,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-disk1,\ +id=3Dvirtio-disk1 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-a= uth-AES.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-= auth-AES.xml new file mode 100644 index 0000000000..63919f1000 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth-AES= .xml @@ -0,0 +1,43 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-= auth-AES.args b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-isc= si-auth-AES.args new file mode 100644 index 0000000000..386353c92c --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth-AE= S.args @@ -0,0 +1,45 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name QEMUGuest2 \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest2/master-key.aes \ +-M pc \ +-m 214 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9466-926a-d65c16db1809 \ +-nographic \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest2/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-no-acpi \ +-boot c \ +-device virtio-scsi-pci,id=3Dscsi0,bus=3Dpci.0,addr=3D0x3 \ +-usb \ +-drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ +-device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ +-object secret,id=3Dhostdev0-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-drive file.driver=3Discsi,file.portal=3Dexample.org:3260,\ +file.target=3Diqn.1992-01.com.example:storage,file.lun=3D1,file.transport= =3Dtcp,\ +file.user=3Dmyname,file.password-secret=3Dhostdev0-secret0,if=3Dnone,forma= t=3Draw,\ +id=3Ddrive-hostdev0 \ +-device scsi-generic,bus=3Dscsi0.0,channel=3D0,scsi-id=3D2,lun=3D4,\ +drive=3Ddrive-hostdev0,id=3Dhostdev0 \ +-object secret,id=3Dhostdev1-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-drive file.driver=3Discsi,file.portal=3Dexample.org:3260,\ +file.target=3Diqn.1992-01.com.example:storage,file.lun=3D2,file.transport= =3Dtcp,\ +file.user=3Dmyname,file.password-secret=3Dhostdev1-secret0,if=3Dnone,forma= t=3Draw,\ +id=3Ddrive-hostdev1 \ +-device scsi-generic,bus=3Dscsi0.0,channel=3D0,scsi-id=3D2,lun=3D5,\ +drive=3Ddrive-hostdev1,id=3Dhostdev1 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-= auth-AES.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscs= i-auth-AES.xml new file mode 100644 index 0000000000..0f63f98872 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth-AE= S.xml @@ -0,0 +1,48 @@ + + QEMUGuest2 + c7a5fdbd-edaf-9466-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2e07b85aa6..00fc16f8a2 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -933,6 +933,10 @@ mymain(void) DO_TEST_PARSE_ERROR("disk-drive-network-iscsi-auth-secrettype-invalid"= , NONE); DO_TEST_PARSE_ERROR("disk-drive-network-iscsi-auth-wrong-secrettype", = NONE); DO_TEST_PARSE_ERROR("disk-drive-network-source-auth-both", NONE); +# ifdef HAVE_GNUTLS_CIPHER_ENCRYPT + DO_TEST("disk-drive-network-iscsi-auth-AES", + QEMU_CAPS_OBJECT_SECRET, QEMU_CAPS_ISCSI_PASSWORD_SECRET); +# endif DO_TEST("disk-drive-network-iscsi-lun", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_BLOCK); @@ -2335,6 +2339,12 @@ mymain(void) DO_TEST("hostdev-scsi-virtio-iscsi-auth", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_SCSI_GENERIC); +# ifdef HAVE_GNUTLS_CIPHER_ENCRYPT + DO_TEST("hostdev-scsi-virtio-iscsi-auth-AES", + QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_VIRTIO_SCSI, + QEMU_CAPS_DEVICE_SCSI_GENERIC, QEMU_CAPS_OBJECT_SECRET, + QEMU_CAPS_ISCSI_PASSWORD_SECRET); +# endif DO_TEST("hostdev-scsi-vhost-scsi-ccw", QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VHOST_SCSI, QEMU_CAPS_DEVICE_SCSI_GENERIC, QEMU_CAPS_VIRTIO_CCW); --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 18:19:15 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 1510147000011280.08707757221816; Wed, 8 Nov 2017 05:16:40 -0800 (PST) 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 7A072D657C; Wed, 8 Nov 2017 13:16:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 498405D967; Wed, 8 Nov 2017 13:16: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 11B103D383; Wed, 8 Nov 2017 13:16:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA8DGEfK020727 for ; Wed, 8 Nov 2017 08:16:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id F41EA6BF80; Wed, 8 Nov 2017 13:16:14 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-90.phx2.redhat.com [10.3.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id B905260634 for ; Wed, 8 Nov 2017 13:16:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7A072D657C 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=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: John Ferlan To: libvir-list@redhat.com Date: Wed, 8 Nov 2017 08:16:00 -0500 Message-Id: <20171108131601.26985-8-jferlan@redhat.com> In-Reply-To: <20171108131601.26985-1-jferlan@redhat.com> References: <20171108131601.26985-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [REPOST PATCH v6 7/8] docs: Add news article regarding auth/encryption placement 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.38]); Wed, 08 Nov 2017 13:16:38 +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 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 87391af856..9ec2780985 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,19 @@
+ + + conf: Move the auth and encryption definitions to disk source + + + Allow parsing and formatting of the auth and + encryption sub-elements to be a child of the + source element. This will allow adding an + auth sub-element to a backingStore + or mirror elements as a means to track specific + authentication and/or encryption needs. + +
--=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 18:19:15 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 1510147002510213.96014902194895; Wed, 8 Nov 2017 05:16:42 -0800 (PST) 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 F3EBEC04AC56; Wed, 8 Nov 2017 13:16:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CEAAF60C94; Wed, 8 Nov 2017 13:16:40 +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 956903D387; Wed, 8 Nov 2017 13:16:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA8DGENQ020750 for ; Wed, 8 Nov 2017 08:16:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5AF1860634; Wed, 8 Nov 2017 13:16:14 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-90.phx2.redhat.com [10.3.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21C0D6BF79 for ; Wed, 8 Nov 2017 13:16:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F3EBEC04AC56 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=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: John Ferlan To: libvir-list@redhat.com Date: Wed, 8 Nov 2017 08:16:01 -0500 Message-Id: <20171108131601.26985-9-jferlan@redhat.com> In-Reply-To: <20171108131601.26985-1-jferlan@redhat.com> References: <20171108131601.26985-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [REPOST PATCH v6 8/8] docs: Add news article to describe iSCSI usage of secret object 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.31]); Wed, 08 Nov 2017 13:16:41 +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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 9ec2780985..800067595f 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -137,6 +137,16 @@ order of appearance. + + + Securely pass iSCSI authentication data + + + Rather than supplying the authentication data as part of the + iSCSI URL for a disk or host device, utilize the encrypted + secret object to securely pass the authentication data. + +
--=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list