From nobody Sat Apr 27 19:39:41 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; dkim=fail; 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 1503988807363915.0478921676845; Mon, 28 Aug 2017 23:40:07 -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 48A554A6F6; Tue, 29 Aug 2017 06:40:04 +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 40D8B62678; Tue, 29 Aug 2017 06:40:03 +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 C644B3FC74; Tue, 29 Aug 2017 06:39:59 +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 v7T6dwgP006938 for ; Tue, 29 Aug 2017 02:39:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 61E9F60276; Tue, 29 Aug 2017 06:39:58 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5B4EA60271; Tue, 29 Aug 2017 06:39:56 +0000 (UTC) Received: from mail-io0-f196.google.com (mail-io0-f196.google.com [209.85.223.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF1DBC049D7F; Tue, 29 Aug 2017 06:39:54 +0000 (UTC) Received: by mail-io0-f196.google.com with SMTP id v96so2582621ioi.3; Mon, 28 Aug 2017 23:39:54 -0700 (PDT) Received: from localhost.localdomain.localdomain ([172.58.73.57]) by smtp.gmail.com with ESMTPSA id u196sm479335itc.12.2017.08.28.23.39.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 23:39:53 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 48A554A6F6 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 48A554A6F6 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hkrTzU/0" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AF1DBC049D7F Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ashmit602@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AF1DBC049D7F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GddhjZ1EPGqK0/zfwSyxRDtGAE5WbYiGmrQPJ18yjDg=; b=hkrTzU/0ocAXrgyMKkJuGn+7grEhR5cv5LAhLzjl1CTQZbPltL41MYpoLECF1IK015 FjK6hFLaYYa0iukBp6iWqgPNr/Qyxga9CiDvwpYrl7s5/OQu1SAnvfT2iv1e0K4QPGIr cQ2bvM4k5wx0Dt7+bxV7K/w/m2TTbSsM++6lxhdByK5mgSf71WkE59gjbhpQZmh23gLV 4IXmpmtlTUUon9QZaGxueUvU2d+osVC+MtOlsxnmTx77tc9k/sN277qJ19ihLuv8197k qPPErJ3sLXlnRoysvUF1j92/ZNqJCiYXN8KUpQcEpDFf3KvNhTY78fDzgMoeWqdlDzWI V2Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GddhjZ1EPGqK0/zfwSyxRDtGAE5WbYiGmrQPJ18yjDg=; b=PstVClngd2Nmf6p4v6Eg2dEj6gqDI+9rP0tBiV+ROaFOewIhY2gsqvGw6NLbu6G38I ICgH4fthcydkD4Pt87nk00MVavypr/hqGpaGbluSE3zDq2TIqCKhFxMDxPDhzjT2IKhv NwSsg11lKO6cVR6s49CWNYZVy3/aTUFWs/yjiXfDTAY1SvZ69cYNudyrWnjA+YobpMwB OsFDaGZRhOmkuQ8jILNU0bD0WL3RBdLP1zOAe1Xy/chJ5HxK0RrZUdNaABf6qFb6p7UX BqfFudiO2N1LE9M2YHL6MXUcaQt4WIu4H2meWIo3PtKtZQrq9gLE9FRf004w7zxVW/iI c24w== X-Gm-Message-State: AHYfb5i+pBKqswcBrZQO4460KMXh/i8ubNsHz4af1hgBqwP/zVtowphi iHqH9jl+1gHFQ4EH0+0= X-Received: by 10.36.9.12 with SMTP id 12mr1046069itm.69.1503988793722; Mon, 28 Aug 2017 23:39:53 -0700 (PDT) From: Ashish Mittal X-Google-Original-From: Ashish Mittal To: libvir-list@redhat.com, jferlan@redhat.com, pbonzini@redhat.com, berrange@redhat.com, jcody@redhat.com, ashish.mittal@veritas.com, stefanha@gmail.com, Ketan.Nilangekar@veritas.com, Nitin.Jerath@veritas.com, venkatesha.mg@veritas.com, pkrempa@redhat.com, areis@redhat.com, pchavva@redhat.com, ashmit602@gmail.com, Suraj.Singh@veritas.com Date: Mon, 28 Aug 2017 23:39:25 -0700 Message-Id: <1503988773-118859-2-git-send-email-Ashish.Mittal@veritas.com> In-Reply-To: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> References: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 29 Aug 2017 06:39:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 29 Aug 2017 06:39:55 +0000 (UTC) for IP:'209.85.223.196' DOMAIN:'mail-io0-f196.google.com' HELO:'mail-io0-f196.google.com' FROM:'ashmit602@gmail.com' RCPT:'' X-RedHat-Spam-Score: -2.66 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.223.196 mail-io0-f196.google.com 209.85.223.196 mail-io0-f196.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Ashish Mittal Subject: [libvirt] [PATCH v5 1/9] Add support for Veritas HyperScale (VxHS) block device protocol 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]); Tue, 29 Aug 2017 06:40:05 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Sample XML for a VxHS disk: eb90327c-8302-4725-9e1b-4e85ed4dc251
Signed-off-by: Ashish Mittal --- v5 changelog: (1) Rebased to latest master. (2) Review comments from Peter Krempa on patch v4 1/3 have been addressed v4 changelog: (1) Fixes per review comments from v3. (2) Had to remove a test from the previous version that checked for error when multiple hosts are specified for VxHS device. This started failing virschematest with the error "XML document failed to validate against schema" as the docs/schemas/domain.rng specifies only a single host. v3 changelog: (1) Implemented the modern syntax for VxHS disk specification. (2) Changed qemuxml2argvdata VxHS test case to verify the new syntax. (3) Added a negative test case to check failure when multiple hosts are specified for a VxHS disk. v2 changelog: (1) Added code for JSON parsing of a VxHS vdisk. (2) Added test case to verify JSON parsing. (3) Added missing switch-case checks for VIR_STORAGE_NET_PROTOCOL_VXHS. (4) Fixed line wrap in qemuxml2argv-disk-drive-network-vxhs.args. docs/formatdomain.html.in | 15 ++++++++--- docs/schemas/domaincommon.rng | 13 ++++++++++ src/libxl/libxl_conf.c | 1 + src/qemu/qemu_block.c | 60 +++++++++++++++++++++++++++++++++++++++= ++++ src/qemu/qemu_command.c | 9 +++++++ src/qemu/qemu_driver.c | 3 +++ src/qemu/qemu_parse_command.c | 15 +++++++++++ src/util/virstoragefile.c | 40 ++++++++++++++++++++++++++++- src/util/virstoragefile.h | 1 + src/xenconfig/xen_xl.c | 1 + 10 files changed, 154 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index fba8cfc..64397d4 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2520,9 +2520,9 @@
The protocol attribute specifies the protocol to access to the requested image. Possible values are "nbd", - "iscsi", "rbd", "sheepdog" or "gluster". If the - protocol attribute is "rbd", "sheepdog" or - "gluster", an additional attribute name is + "iscsi", "rbd", "sheepdog", "gluster" or "vxhs". If the + protocol attribute is "rbd", "sheepdog", "glust= er" + or "vxhs", an additional attribute name is mandatory to specify which volume/image will be used. For "n= bd", the name attribute is optional. For "iscsi" (since 1.0.4), the name @@ -2530,6 +2530,9 @@ target's name by a slash (e.g., iqn.2013-07.com.example:iscsi-pool/1). If not specified, the default LUN is zero. + For "vxhs" (since 3.8.0), the + name is the UUID of the volume, assigned by the + HyperScale sever. Since 0.8.7
volume
@@ -2632,6 +2635,12 @@ one or more (Since 2.1.0= ), just one prior to that 24007 + + vxhs + a server running Veritas HyperScale daemon + only one + 9999 +

gluster supports "tcp", "rdma", "unix" as valid values for the diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 3f56d8f..458b8d8 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1642,6 +1642,18 @@ =20 + + + + + vxhs + + + + + + + network @@ -1652,6 +1664,7 @@ + =20 diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 4416a09..34233a9 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -666,6 +666,7 @@ libxlMakeNetworkDiskSrcStr(virStorageSourcePtr src, case VIR_STORAGE_NET_PROTOCOL_GLUSTER: case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG: case VIR_STORAGE_NET_PROTOCOL_SSH: + case VIR_STORAGE_NET_PROTOCOL_VXHS: case VIR_STORAGE_NET_PROTOCOL_LAST: case VIR_STORAGE_NET_PROTOCOL_NONE: virReportError(VIR_ERR_NO_SUPPORT, diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 7fb12ea..a4d0160 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -23,6 +23,7 @@ =20 #include "viralloc.h" #include "virstring.h" +#include "qemu_alias.h" =20 #define VIR_FROM_THIS VIR_FROM_QEMU =20 @@ -482,6 +483,60 @@ qemuBlockStorageSourceGetGlusterProps(virStorageSource= Ptr src) } =20 =20 +static virJSONValuePtr +qemuBuildVxHSDriveJSONHost(virStorageSourcePtr src) +{ + virJSONValuePtr server =3D NULL; + virStorageNetHostDefPtr host; + unsigned int port; + + if (src->nhosts !=3D 1) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("protocol VxHS accepts only one host")); + return NULL; + } + + host =3D src->hosts; + port =3D host->port; + + if (virJSONValueObjectCreate(&server, + "s:host", host->name, + "u:port", port, + NULL) < 0) + server =3D NULL; + + return server; +} + + +static virJSONValuePtr +qemuBlockStorageSourceGetVxHSProps(virStorageSourcePtr src) +{ + const char *protocol =3D virStorageNetProtocolTypeToString(src->protoc= ol); + virJSONValuePtr server =3D NULL; + virJSONValuePtr ret =3D NULL; + + if (!(server =3D qemuBuildVxHSDriveJSONHost(src))) + return NULL; + + /* VxHS disk specification example: + * { driver:"vxhs", + * vdisk-id:"eb90327c-8302-4725-4e85ed4dc251", + * server.host:"1.2.3.4", + * server.port:1234} + */ + if (virJSONValueObjectCreate(&ret, + "s:driver", protocol, + "s:vdisk-id", src->path, + "a:server", server, NULL) < 0) { + virJSONValueFree(server); + ret =3D NULL; + } + + return ret; +} + + /** * qemuBlockStorageSourceGetBackendProps: * @src: disk source @@ -512,6 +567,11 @@ qemuBlockStorageSourceGetBackendProps(virStorageSource= Ptr src) goto cleanup; break; =20 + case VIR_STORAGE_NET_PROTOCOL_VXHS: + if (!(fileprops =3D qemuBlockStorageSourceGetVxHSProps(src))) + goto cleanup; + break; + case VIR_STORAGE_NET_PROTOCOL_NBD: case VIR_STORAGE_NET_PROTOCOL_RBD: case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG: diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a68ff71..0fd2674 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -991,6 +991,11 @@ qemuBuildNetworkDriveStr(virStorageSourcePtr src, ret =3D virBufferContentAndReset(&buf); break; =20 + case VIR_STORAGE_NET_PROTOCOL_VXHS: + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("'VxHS' protocol does not support URI syntax"= )); + goto cleanup; + case VIR_STORAGE_NET_PROTOCOL_SSH: virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("'ssh' protocol is not yet supported")); @@ -1325,6 +1330,10 @@ qemuDiskSourceNeedsProps(virStorageSourcePtr src) src->nhosts > 1) return true; =20 + if (actualType =3D=3D VIR_STORAGE_TYPE_NETWORK && + src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_VXHS) + return true; + return false; } =20 diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2ba6c80..da28c4f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13732,6 +13732,7 @@ qemuDomainSnapshotPrepareDiskExternalBackingInactiv= e(virDomainDiskDefPtr disk) case VIR_STORAGE_NET_PROTOCOL_FTPS: case VIR_STORAGE_NET_PROTOCOL_TFTP: case VIR_STORAGE_NET_PROTOCOL_SSH: + case VIR_STORAGE_NET_PROTOCOL_VXHS: case VIR_STORAGE_NET_PROTOCOL_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, _("external inactive snapshots are not supporte= d on " @@ -13795,6 +13796,7 @@ qemuDomainSnapshotPrepareDiskExternalOverlayActive(= virDomainSnapshotDiskDefPtr d case VIR_STORAGE_NET_PROTOCOL_FTPS: case VIR_STORAGE_NET_PROTOCOL_TFTP: case VIR_STORAGE_NET_PROTOCOL_SSH: + case VIR_STORAGE_NET_PROTOCOL_VXHS: case VIR_STORAGE_NET_PROTOCOL_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, _("external active snapshots are not supported = on " @@ -13940,6 +13942,7 @@ qemuDomainSnapshotPrepareDiskInternal(virConnectPtr= conn, case VIR_STORAGE_NET_PROTOCOL_FTPS: case VIR_STORAGE_NET_PROTOCOL_TFTP: case VIR_STORAGE_NET_PROTOCOL_SSH: + case VIR_STORAGE_NET_PROTOCOL_VXHS: case VIR_STORAGE_NET_PROTOCOL_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, _("internal inactive snapshots are not supporte= d on " diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c index 8cb96a2..6286c2e 100644 --- a/src/qemu/qemu_parse_command.c +++ b/src/qemu/qemu_parse_command.c @@ -736,6 +736,11 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt, if (VIR_STRDUP(def->src->path, vdi) < 0) goto error; } + } else if (STRPREFIX(def->src->path, "vxhs:")) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("VxHS protocol does not support URI s= yntax '%s'"), + def->src->path); + goto error; } else { def->src->type =3D VIR_STORAGE_TYPE_FILE; } @@ -1944,6 +1949,10 @@ qemuParseCommandLine(virCapsPtr caps, disk->src->type =3D VIR_STORAGE_TYPE_NETWORK; disk->src->protocol =3D VIR_STORAGE_NET_PROTOCOL_SHEEPDOG; val +=3D strlen("sheepdog:"); + } else if (STRPREFIX(val, "vxhs:")) { + disk->src->type =3D VIR_STORAGE_TYPE_NETWORK; + disk->src->protocol =3D VIR_STORAGE_NET_PROTOCOL_VXHS; + val +=3D strlen("vxhs:"); } else { disk->src->type =3D VIR_STORAGE_TYPE_FILE; } @@ -2020,6 +2029,12 @@ qemuParseCommandLine(virCapsPtr caps, goto error; =20 break; + case VIR_STORAGE_NET_PROTOCOL_VXHS: + virReportError(VIR_ERR_INTERNAL_ERROR, + _("VxHS protocol does not support URI " + "syntax '%s'"), disk->src->path); + goto error; + break; case VIR_STORAGE_NET_PROTOCOL_HTTP: case VIR_STORAGE_NET_PROTOCOL_HTTPS: case VIR_STORAGE_NET_PROTOCOL_FTP: diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index fbc8245..e9a59e0 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -85,7 +85,8 @@ VIR_ENUM_IMPL(virStorageNetProtocol, VIR_STORAGE_NET_PROT= OCOL_LAST, "ftp", "ftps", "tftp", - "ssh") + "ssh", + "vxhs") =20 VIR_ENUM_IMPL(virStorageNetHostTransport, VIR_STORAGE_NET_HOST_TRANS_LAST, "tcp", @@ -2712,6 +2713,7 @@ virStorageSourceParseBackingColon(virStorageSourcePtr= src, case VIR_STORAGE_NET_PROTOCOL_ISCSI: case VIR_STORAGE_NET_PROTOCOL_GLUSTER: case VIR_STORAGE_NET_PROTOCOL_SSH: + case VIR_STORAGE_NET_PROTOCOL_VXHS: virReportError(VIR_ERR_INTERNAL_ERROR, _("malformed backing store path for protocol %s"), protocol); @@ -3210,6 +3212,38 @@ virStorageSourceParseBackingJSONRaw(virStorageSource= Ptr src, return virStorageSourceParseBackingJSONInternal(src, json); } =20 +static int +virStorageSourceParseBackingJSONVxHS(virStorageSourcePtr src, + virJSONValuePtr json, + int opaque ATTRIBUTE_UNUSED) +{ + const char *vdisk_id =3D virJSONValueObjectGetString(json, "vdisk-id"); + virJSONValuePtr server =3D virJSONValueObjectGetObject(json, "server"); + + if (!vdisk_id || !server) { + virReportError(VIR_ERR_INVALID_ARG, "%s", + _("missing 'vdisk-id' or 'server' attribute in " + "JSON backing definition for VxHS volume")); + return -1; + } + + src->type =3D VIR_STORAGE_TYPE_NETWORK; + src->protocol =3D VIR_STORAGE_NET_PROTOCOL_VXHS; + + if (VIR_STRDUP(src->path, vdisk_id) < 0) + return -1; + + if (VIR_ALLOC_N(src->hosts, 1) < 0) + return -1; + src->nhosts =3D 1; + + if (virStorageSourceParseBackingJSONInetSocketAddress(src->hosts, + server) < 0) + return -1; + + return 0; +} + struct virStorageSourceJSONDriverParser { const char *drvname; int (*func)(virStorageSourcePtr src, virJSONValuePtr json, int opaque); @@ -3232,6 +3266,7 @@ static const struct virStorageSourceJSONDriverParser = jsonParsers[] =3D { {"ssh", virStorageSourceParseBackingJSONSSH, 0}, {"rbd", virStorageSourceParseBackingJSONRBD, 0}, {"raw", virStorageSourceParseBackingJSONRaw, 0}, + {"vxhs", virStorageSourceParseBackingJSONVxHS, 0}, }; =20 =20 @@ -3992,6 +4027,9 @@ virStorageSourceNetworkDefaultPort(virStorageNetProto= col protocol) /* we don't provide a default for RBD */ return 0; =20 + case VIR_STORAGE_NET_PROTOCOL_VXHS: + return 9999; + case VIR_STORAGE_NET_PROTOCOL_LAST: case VIR_STORAGE_NET_PROTOCOL_NONE: return 0; diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index 6c388b1..f7e897f 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -134,6 +134,7 @@ typedef enum { VIR_STORAGE_NET_PROTOCOL_FTPS, VIR_STORAGE_NET_PROTOCOL_TFTP, VIR_STORAGE_NET_PROTOCOL_SSH, + VIR_STORAGE_NET_PROTOCOL_VXHS, =20 VIR_STORAGE_NET_PROTOCOL_LAST } virStorageNetProtocol; diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index d168d3f..8acbfe3 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -1024,6 +1024,7 @@ xenFormatXLDiskSrcNet(virStorageSourcePtr src) case VIR_STORAGE_NET_PROTOCOL_GLUSTER: case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG: case VIR_STORAGE_NET_PROTOCOL_SSH: + case VIR_STORAGE_NET_PROTOCOL_VXHS: case VIR_STORAGE_NET_PROTOCOL_LAST: case VIR_STORAGE_NET_PROTOCOL_NONE: virReportError(VIR_ERR_NO_SUPPORT, --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 19:39:41 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; dkim=fail; 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 1503988827646322.5322204356878; Mon, 28 Aug 2017 23:40:27 -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 808B16146A; Tue, 29 Aug 2017 06:40:25 +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 5632F60FB6; Tue, 29 Aug 2017 06:40:25 +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 1F6F33FC75; Tue, 29 Aug 2017 06:40:25 +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 v7T6dxL1006943 for ; Tue, 29 Aug 2017 02:39:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id D5BA16027A; Tue, 29 Aug 2017 06:39:59 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C63D260275; Tue, 29 Aug 2017 06:39:59 +0000 (UTC) Received: from mail-io0-f194.google.com (mail-io0-f194.google.com [209.85.223.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F8E2883DA; Tue, 29 Aug 2017 06:39:58 +0000 (UTC) Received: by mail-io0-f194.google.com with SMTP id v96so2582721ioi.3; Mon, 28 Aug 2017 23:39:58 -0700 (PDT) Received: from localhost.localdomain.localdomain ([172.58.73.57]) by smtp.gmail.com with ESMTPSA id u196sm479335itc.12.2017.08.28.23.39.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 23:39:56 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 808B16146A Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 808B16146A Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rC0uCWrU" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6F8E2883DA Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ashmit602@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6F8E2883DA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=F7sveaQ0VzpeSYv/oBy+P2OfFG0ZtW1VS9oCRTK3x7E=; b=rC0uCWrUaqNTHxcrheKoni+hlo+L219mhvay8VrRM6AJbflLq/yR9UyPf5kW/XRBHr +kS1ranqGQStNXPeZhk2jXi5nz1uQd01QJS4YlfYJC+FeWGwPw9oAmp5fvOs4HzWnEcT 29hZa91f8Tw2a+3K744Uz2qV8HP2Lni4OpL6ynz9JKJ+0qNoLSu9JTFGgn11Fm4YSmFn iy6B7x59dWbLlELkxSrSDO6ylOEedn3vAL6OolmuftqeqehEdF0isghZd3NCbjDYwZPV 6NvDF4aNsJo4cLlPsC0qJw+01jJUaEQCjF3qNu9nNUXhA1IPCta3D3y1IfD6ISecFZP5 xlnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=F7sveaQ0VzpeSYv/oBy+P2OfFG0ZtW1VS9oCRTK3x7E=; b=CuhfqYKPPqIFkET2Zy8OzI5m1OrJwVy8bcM9CAYIuO/Wt1A907ZH8MXrr75qPvgZH0 /M3rl7uibalKh24AjczibZoMaTZ3KRcv8/x5KFYk+NvanKt1egAbYWKonsJ0cD2bR1x0 wpr7yDaGqBO65elmhSp7etHFGqBpJJfGN7/VySymdEezL1AGH/oGPRy50EsiWwHrMl08 pU9sCX5eY9jH00wjNFv2QISWI1XDzF656C+YmOrhS4kGIQumONQ1XpvZFcaxFqNHiJ2e T6IZA6F8oe/lMVEC8PKvZypLHdy6U7OEi8aQ6/kvTtzbDqRbivCdPHhuOz11yzg7LrN0 cJyQ== X-Gm-Message-State: AHYfb5ihiSJD2L7Xndf8ATs/h9YOKVLa32/SZTt2MwaO3M0M+/lDGzMD H+oSFJkyc+/1+U9QkFI= X-Received: by 10.36.254.10 with SMTP id w10mr3139423ith.8.1503988797537; Mon, 28 Aug 2017 23:39:57 -0700 (PDT) From: Ashish Mittal X-Google-Original-From: Ashish Mittal To: libvir-list@redhat.com, jferlan@redhat.com, pbonzini@redhat.com, berrange@redhat.com, jcody@redhat.com, ashish.mittal@veritas.com, stefanha@gmail.com, Ketan.Nilangekar@veritas.com, Nitin.Jerath@veritas.com, venkatesha.mg@veritas.com, pkrempa@redhat.com, areis@redhat.com, pchavva@redhat.com, ashmit602@gmail.com, Suraj.Singh@veritas.com Date: Mon, 28 Aug 2017 23:39:26 -0700 Message-Id: <1503988773-118859-3-git-send-email-Ashish.Mittal@veritas.com> In-Reply-To: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> References: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 29 Aug 2017 06:39:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 29 Aug 2017 06:39:58 +0000 (UTC) for IP:'209.85.223.194' DOMAIN:'mail-io0-f194.google.com' HELO:'mail-io0-f194.google.com' FROM:'ashmit602@gmail.com' RCPT:'' X-RedHat-Spam-Score: -2.66 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.223.194 mail-io0-f194.google.com 209.85.223.194 mail-io0-f194.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Ashish Mittal Subject: [libvirt] [PATCH v5 2/9] Add a test case to verify generation of qemu command line args for a VxHS disk 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.39]); Tue, 29 Aug 2017 06:40:26 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Ashish Mittal --- .../qemuxml2argv-disk-drive-network-vxhs.args | 27 +++++++++++++++++ .../qemuxml2argv-disk-drive-network-vxhs.xml | 34 ++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 62 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-= vxhs.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-= vxhs.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.ar= gs b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args new file mode 100644 index 0000000..1747dc8 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.args @@ -0,0 +1,27 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-M pc \ +-cpu qemu32 \ +-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 \ +-drive file.driver=3Dvxhs,file.vdisk-id=3Deb90327c-8302-4725-9e1b-4e85ed4d= c251,\ +file.server.host=3D192.168.0.1,file.server.port=3D9999,format=3Draw,if=3Dn= one,\ +id=3Ddrive-virtio-disk0,cache=3Dnone \ +-device virtio-blk-pci,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-disk0,\ +id=3Dvirtio-disk0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.xm= l b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.xml new file mode 100644 index 0000000..a488770 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-vxhs.xml @@ -0,0 +1,34 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + eb90327c-8302-4725-9e1b-4e85ed4dc251 + +

+ + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 5cdbc78..f7dbf39 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -931,6 +931,7 @@ mymain(void) # endif DO_TEST("disk-drive-network-rbd-ipv6", NONE); DO_TEST_FAILURE("disk-drive-network-rbd-no-colon", NONE); + DO_TEST("disk-drive-network-vxhs", NONE); DO_TEST("disk-drive-no-boot", QEMU_CAPS_BOOTINDEX); DO_TEST_PARSE_ERROR("disk-device-lun-type-invalid", --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 19:39:41 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; dkim=fail; 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 1503988831147473.86369169555223; Mon, 28 Aug 2017 23:40:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 31E236DB; Tue, 29 Aug 2017 06:40:29 +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 126405C588; Tue, 29 Aug 2017 06:40:29 +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 D08543FACD; Tue, 29 Aug 2017 06:40:28 +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 v7T6e8tY006979 for ; Tue, 29 Aug 2017 02:40:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1F7256FDC2; Tue, 29 Aug 2017 06:40:08 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F12F6FDC6; Tue, 29 Aug 2017 06:40:02 +0000 (UTC) Received: from mail-io0-f196.google.com (mail-io0-f196.google.com [209.85.223.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7706481DE1; Tue, 29 Aug 2017 06:40:01 +0000 (UTC) Received: by mail-io0-f196.google.com with SMTP id c18so2589197ioj.2; Mon, 28 Aug 2017 23:40:01 -0700 (PDT) Received: from localhost.localdomain.localdomain ([172.58.73.57]) by smtp.gmail.com with ESMTPSA id u196sm479335itc.12.2017.08.28.23.39.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 23:40:00 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 31E236DB Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 31E236DB Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="e17SmvNu" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7706481DE1 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ashmit602@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7706481DE1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=61Czp8wNTmO9ZJbxjuou4pkxeb1+EYlT9AcoEL4GvRc=; b=e17SmvNubBFctt64RK9CIkhNGEYqK4Wha/veM8XIfXdwcmJAefRRJu1Tj1klrdd8Qn eafXkGKZwMKA+PzCBj56piDmKa3pZbmDWgd9XvUlSELkioK2N0xMTuIV1TZ/w0w8Mv8q +zF9edEAnhrQfo3MOwSBOZhcIqudd7FaeSdR/iSHogGjmKRgi9bLhpVRyx8f23T6+qIZ eOvPHBO0sTAGi6UY1jcTms5LHFxMZArB/EbYtVcNX5Ql1lYRv1ECsf4TRfeU7F9UIidp jinr39lAawaXgvHYawXy2heoJtUT1H+pkN4XjI3+PhgDzk0UG/eCFQ8b3Lfd/SfWGhPG gu0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=61Czp8wNTmO9ZJbxjuou4pkxeb1+EYlT9AcoEL4GvRc=; b=ShSCPKfxbvpUtLwqlN9l8ILYaNuRV2Ge8XHYjhAQEjMM3WHRZvXy715n3OKO32AAgM ExT8vD1C1BmXPIZ114c5hC7JvtfhaSEUn9ynqkWoZHEaeJfQem7JYWU1yXZwzAM5ls/P 2UHfnMtwAwBF4du2iiJzhFtd6QpOcd4rDYjEBjPFd00e7oxmKcLY0Rd/H5r+w1HJr+iQ 2mKMKtBJjdW+Jv+YoqBngW4Aey2ljbsqniZBMqIgrujNiZ0mQDjILpQPZeRo8sPHsEU3 +O0RHQIzitO5rv8jFaGg+4MmV3vsMsUs47WqPlt1T4ANDk6RGXJFbpuIUJdjvu9TVZB2 sENQ== X-Gm-Message-State: AHYfb5gkY5R/30QfcDquBKlY27bPLyc8x8xPOBiZ6gksK3aIUwif42XA NN4UaLe3vsIjvFJG9iQ= X-Received: by 10.36.46.82 with SMTP id i79mr1026156ita.89.1503988800629; Mon, 28 Aug 2017 23:40:00 -0700 (PDT) From: Ashish Mittal X-Google-Original-From: Ashish Mittal To: libvir-list@redhat.com, jferlan@redhat.com, pbonzini@redhat.com, berrange@redhat.com, jcody@redhat.com, ashish.mittal@veritas.com, stefanha@gmail.com, Ketan.Nilangekar@veritas.com, Nitin.Jerath@veritas.com, venkatesha.mg@veritas.com, pkrempa@redhat.com, areis@redhat.com, pchavva@redhat.com, ashmit602@gmail.com, Suraj.Singh@veritas.com Date: Mon, 28 Aug 2017 23:39:27 -0700 Message-Id: <1503988773-118859-4-git-send-email-Ashish.Mittal@veritas.com> In-Reply-To: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> References: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 29 Aug 2017 06:40:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 29 Aug 2017 06:40:01 +0000 (UTC) for IP:'209.85.223.196' DOMAIN:'mail-io0-f196.google.com' HELO:'mail-io0-f196.google.com' FROM:'ashmit602@gmail.com' RCPT:'' X-RedHat-Spam-Score: -2.66 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.223.196 mail-io0-f196.google.com 209.85.223.196 mail-io0-f196.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Ashish Mittal Subject: [libvirt] [PATCH v5 3/9] Add a test case to verify parsing of VxHS backing storage. 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 29 Aug 2017 06:40:29 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Ashish Mittal --- tests/virstoragetest.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index d83db78..f8444e1 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -1585,6 +1585,16 @@ mymain(void) "\n" " \n" "\n"); + TEST_BACKING_PARSE("json:{\"file\":{\"driver\":\"vxhs\"," + "\"vdisk-id\":\"c6718f6b-0401-441d-= a8c3-1f0064d75ee0\"," + "\"server\": { \"host\":\"example.c= om\"," + "\"port\":\"1234\"" + "}" + "}" + "}", + "\n" + " \n" + "\n"); #endif /* WITH_YAJL */ =20 cleanup: --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 19:39:41 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; dkim=fail; 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 1503988834495376.2214837846801; Mon, 28 Aug 2017 23:40:34 -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 ADD16C0587C8; Tue, 29 Aug 2017 06:40:31 +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 8F0134F9FB; Tue, 29 Aug 2017 06:40:31 +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 553E71800C8A; Tue, 29 Aug 2017 06:40: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 v7T6eDFq006991 for ; Tue, 29 Aug 2017 02:40:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7CCE06BC06; Tue, 29 Aug 2017 06:40:13 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E49EE5C6F6; Tue, 29 Aug 2017 06:40:12 +0000 (UTC) Received: from mail-io0-f194.google.com (mail-io0-f194.google.com [209.85.223.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 86371C0587E4; Tue, 29 Aug 2017 06:40:05 +0000 (UTC) Received: by mail-io0-f194.google.com with SMTP id j99so2583567ioo.4; Mon, 28 Aug 2017 23:40:05 -0700 (PDT) Received: from localhost.localdomain.localdomain ([172.58.73.57]) by smtp.gmail.com with ESMTPSA id u196sm479335itc.12.2017.08.28.23.40.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 23:40:04 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ADD16C0587C8 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com ADD16C0587C8 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c1EVXss+" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 86371C0587E4 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ashmit602@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 86371C0587E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yY5VOPsSSxm1+IosjgywwegYFGyUmJDswPnYc/kADLY=; b=c1EVXss+la10dbQSEZI2E9jxNASDnTMf0mgKWa88xtqQcrzM9DPgiCPiaFLivoYQ/i 13MwDeFftPpjEC99TEF5SFWgGyMcxyTr8suG9l4hJRqK+q0lBBgTyS/0PwxRtjeTS19B eWXe69itm4aFOpMV2BRV+MaY0sArjUf9BgYllyOwisMvDBQtJbpIdbPEZG1tCC4QPTUQ VdDqSz8iw8sB+EVPt/L2InAL1c29VNsIiCB7Vbs1Onp//lpJDvBfVgpbRfzdfRQBXX8w QOf2LMmsk5nJhSSycjyeFwm1gblflRoLe3EnDTtAJodhadVWMggzzWpu1LWP+yZ410y+ 3YOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yY5VOPsSSxm1+IosjgywwegYFGyUmJDswPnYc/kADLY=; b=m/HxHJsi9Irgxteiq6ZQQswZDW+7BEDhtJEJhoFD9lnRW2k0/NTQ82wLcbLErhoitA kzUC1/eHq/NGVZBs/NAH/CGGsUvPuUhQxEW7hc9jseZoYMTEDTBf7ZLj9yJDEOHPKAXS xeL0/IwTLXQGunClGt5tVe+z2utaXr2yC8angxJ8KLh0/AYqof0B56t7dVZZ7qXarMNr OCBtgH8WZP9/f2jUdnrax8bLKfuMjXzI/r4677e3g+QTHw+ExhwQZGd3JRDuIS3dZiWt cieJZp0NUpNNX+EWV56JTsRav6e0m/iwZkM/zJ+2Q5FwpqrUe6GBqJUMnU1m3QlTfiL/ 6a1w== X-Gm-Message-State: AHYfb5hBAu25qr/n4IzY2ev8go4pZBGK73NDT5RWAJ/9NML7SjzHiUKn dUeC1PdYC9L/HlrqblU= X-Received: by 10.36.144.5 with SMTP id x5mr3295477itd.185.1503988804563; Mon, 28 Aug 2017 23:40:04 -0700 (PDT) From: Ashish Mittal X-Google-Original-From: Ashish Mittal To: libvir-list@redhat.com, jferlan@redhat.com, pbonzini@redhat.com, berrange@redhat.com, jcody@redhat.com, ashish.mittal@veritas.com, stefanha@gmail.com, Ketan.Nilangekar@veritas.com, Nitin.Jerath@veritas.com, venkatesha.mg@veritas.com, pkrempa@redhat.com, areis@redhat.com, pchavva@redhat.com, ashmit602@gmail.com, Suraj.Singh@veritas.com Date: Mon, 28 Aug 2017 23:39:28 -0700 Message-Id: <1503988773-118859-5-git-send-email-Ashish.Mittal@veritas.com> In-Reply-To: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> References: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 29 Aug 2017 06:40:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 29 Aug 2017 06:40:05 +0000 (UTC) for IP:'209.85.223.194' DOMAIN:'mail-io0-f194.google.com' HELO:'mail-io0-f194.google.com' FROM:'ashmit602@gmail.com' RCPT:'' X-RedHat-Spam-Score: -2.66 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.223.194 mail-io0-f194.google.com 209.85.223.194 mail-io0-f194.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Ashish Mittal Subject: [libvirt] [PATCH v5 4/9] conf: Introduce TLS options for VxHS block device clients 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.32]); Tue, 29 Aug 2017 06:40:32 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a new TLS X.509 certificate type - "vxhs". This will handle the creation of a TLS certificate capability for properly configured VxHS network block device clients. Signed-off-by: Ashish Mittal --- v5 changelog: (1) Fixed the release version for VxHS changes. (2) No functional changes. v4 changelog: (1) Add two new options in /etc/libvirt/qemu.conf to control TLS behavior with VxHS block devices "vxhs_tls" and "vxhs_tls_x509_cert_dir". (2) Setting "vxhs_tls=3D1" in /etc/libvirt/qemu.conf will enable TLS for VxHS block devices. (3) "vxhs_tls_x509_cert_dir" can be set to the full path where the TLS certificates and keys are saved. If this value is missing, the "default_tls_x509_cert_dir" will be used instead. docs/formatdomain.html.in | 16 ++++++++++++++++ src/qemu/libvirtd_qemu.aug | 4 ++++ src/qemu/qemu.conf | 23 +++++++++++++++++++++++ src/qemu/qemu_conf.c | 7 +++++++ src/qemu/qemu_conf.h | 3 +++ src/qemu/test_libvirtd_qemu.aug.in | 2 ++ 6 files changed, 55 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 64397d4..41b4ea8 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2649,6 +2649,22 @@ transport is "unix", the socket attribute specifies the path t= o an AF_UNIX socket.

+

+ Since 3.8.0, the optional attribu= te + tls (QEMU only) can be used to control whether a = vxhs + network block device would utilize a hypervisor configured + TLS X.509 certificate environment in order to encrypt the data + channel. For the QEMU hypervisor, usage of a TLS environment c= an + be controlled on the host by the vxhs_tls and + vxhs_tls_x509_cert_dir or + default_tls_x509_cert_dir settings in the file + /etc/libvirt/qemu.conf. If vxhs_tls is enabled, + then unless the domain tls attribute is set to "n= o", + libvirt will use the host configured TLS environment. + If vxhs_tls is disabled, but the tls + attribute is set to "yes" in the device domain specification, + then libvirt will throw an error. +

snapshot
diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug index e1983d1..c19bf3a 100644 --- a/src/qemu/libvirtd_qemu.aug +++ b/src/qemu/libvirtd_qemu.aug @@ -115,6 +115,9 @@ module Libvirtd_qemu =3D =20 let memory_entry =3D str_entry "memory_backing_dir" =20 + let vxhs_entry =3D bool_entry "vxhs_tls" + | str_entry "vxhs_tls_x509_cert_dir" + (* Each entry in the config is one of the following ... *) let entry =3D default_tls_entry | vnc_entry @@ -133,6 +136,7 @@ module Libvirtd_qemu =3D | nvram_entry | gluster_debug_level_entry | memory_entry + | vxhs_entry =20 let comment =3D [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \= t\n][^\n]*)?/ . del /\n/ "\n" ] let empty =3D [ label "#empty" . eol ] diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf index f977e3b..0bbcdb2 100644 --- a/src/qemu/qemu.conf +++ b/src/qemu/qemu.conf @@ -258,6 +258,29 @@ #chardev_tls_x509_secret_uuid =3D "00000000-0000-0000-0000-000000000000" =20 =20 +# Enable use of TLS encryption on the VxHS network block devices. +# +# When the VxHS network block device server is set up appropriately, +# x509 certificates are used for authentication between the clients +# (qemu processes) and the remote VxHS server. +# +# It is necessary to setup CA and issue client and server certificates +# before enabling this. +# +#vxhs_tls =3D 1 + + +# In order to override the default TLS certificate location for VxHS +# device TCP certificates, supply a valid path to the certificate director= y. +# This is used to authenticate the VxHS block device clients to the VxHS +# server. +# +# If the provided path does not exist then the default_tls_x509_cert_dir +# path will be used. +# +#vxhs_tls_x509_cert_dir =3D "/etc/pki/libvirt-vxhs" + + # In order to override the default TLS certificate location for migration # certificates, supply a valid path to the certificate directory. If the # provided path does not exist then the default_tls_x509_cert_dir path diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index ab5f7cc..3d53a86 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -283,6 +283,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool priv= ileged) SET_TLS_X509_CERT_DEFAULT(spice); SET_TLS_X509_CERT_DEFAULT(chardev); SET_TLS_X509_CERT_DEFAULT(migrate); + SET_TLS_X509_CERT_DEFAULT(vxhs); =20 #undef SET_TLS_X509_CERT_DEFAULT =20 @@ -380,6 +381,8 @@ static void virQEMUDriverConfigDispose(void *obj) VIR_FREE(cfg->chardevTLSx509certdir); VIR_FREE(cfg->chardevTLSx509secretUUID); =20 + VIR_FREE(cfg->vxhsTLSx509certdir); + VIR_FREE(cfg->migrateTLSx509certdir); VIR_FREE(cfg->migrateTLSx509secretUUID); =20 @@ -556,6 +559,10 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr= cfg, goto cleanup; if (virConfGetValueBool(conf, "spice_auto_unix_socket", &cfg->spiceAut= oUnixSocket) < 0) goto cleanup; + if (virConfGetValueBool(conf, "vxhs_tls", &cfg->vxhsTLS) < 0) + goto cleanup; + if (virConfGetValueString(conf, "vxhs_tls_x509_cert_dir", &cfg->vxhsTL= Sx509certdir) < 0) + goto cleanup; =20 #define GET_CONFIG_TLS_CERTINFO(val) = \ do { = \ diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index d469b50..13b6f81 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -203,6 +203,9 @@ struct _virQEMUDriverConfig { unsigned int glusterDebugLevel; =20 char *memoryBackingDir; + + bool vxhsTLS; + char *vxhsTLSx509certdir; }; =20 /* Main driver state */ diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qe= mu.aug.in index 676d48c..688e5b9 100644 --- a/src/qemu/test_libvirtd_qemu.aug.in +++ b/src/qemu/test_libvirtd_qemu.aug.in @@ -25,6 +25,8 @@ module Test_libvirtd_qemu =3D { "chardev_tls_x509_cert_dir" =3D "/etc/pki/libvirt-chardev" } { "chardev_tls_x509_verify" =3D "1" } { "chardev_tls_x509_secret_uuid" =3D "00000000-0000-0000-0000-000000000000= " } +{ "vxhs_tls" =3D "1" } +{ "vxhs_tls_x509_cert_dir" =3D "/etc/pki/libvirt-vxhs" } { "migrate_tls_x509_cert_dir" =3D "/etc/pki/libvirt-migrate" } { "migrate_tls_x509_verify" =3D "1" } { "migrate_tls_x509_secret_uuid" =3D "00000000-0000-0000-0000-000000000000= " } --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 19:39:41 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; dkim=fail; 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 1503988836256544.9446326155206; Mon, 28 Aug 2017 23:40: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 44FBAC056870; Tue, 29 Aug 2017 06:40: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 2408F66D65; Tue, 29 Aug 2017 06:40: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 DEB803FAD3; Tue, 29 Aug 2017 06:40: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 v7T6eDcG006990 for ; Tue, 29 Aug 2017 02:40:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7BDDB6A76B; Tue, 29 Aug 2017 06:40:13 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 018486A77F; Tue, 29 Aug 2017 06:40:10 +0000 (UTC) Received: from mail-io0-f195.google.com (mail-io0-f195.google.com [209.85.223.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1BC3D5D698; Tue, 29 Aug 2017 06:40:09 +0000 (UTC) Received: by mail-io0-f195.google.com with SMTP id m40so2573649ioi.5; Mon, 28 Aug 2017 23:40:09 -0700 (PDT) Received: from localhost.localdomain.localdomain ([172.58.73.57]) by smtp.gmail.com with ESMTPSA id u196sm479335itc.12.2017.08.28.23.40.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 23:40:07 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 44FBAC056870 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 44FBAC056870 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VAA97ucR" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1BC3D5D698 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ashmit602@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1BC3D5D698 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=P2jKpctQ5QxTXg2VDchJVEh5wQr1pdJUQL+bJEiGyMQ=; b=VAA97ucR3IFu6kp1hMqRoBgK6tWO+64A9G9+k8bzv2oa+vpALGohgGh2GlrcSebdGs nR+3qkI80osHKKRJD9pMglc1lEAeHCS/jin+U5a50ydalBKeKmrmS7xpZSz/T49XI8J7 Chtmpz2YeWN/NVoW6cTqVCaEKAUaWXOzSG6zXmlOud9WCknQsmZ2tT0XXPw21xWj+N3X f5YlXQpsZ+XLfmHCEkEhZyghXoYdtw56GZS3kmwkLMMfLQyMlpTdxGFwAJ8MBt5DauB8 HQKcSNiQdUgkO9JZl+PV49yGS75Bq+XGOIPMixuFuPLO1QaRbXuYKDshBrdzXxoPBOYA DBBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=P2jKpctQ5QxTXg2VDchJVEh5wQr1pdJUQL+bJEiGyMQ=; b=jJLheHHU73MFSXGRrYu0nsX+GaUMySQLksc3jVN8PcPBYTa6YRU94vWIg0fCZqIsun b1+fcj3G6xxmSwUU4Fjacg0kxUyVbhB8s4LDW72z7bJyF0Q0vDw7j7eM93vTmVhXb5Tn FXZ/RYcHDxTPBkm6Zzp1aR8tBjn1Dcebxb1CPW+XJTuhDpgGTvL8BhjAYIQMc4RbKWRN 4ZdrQ7zcYcuLB2gjCnwPG432JheK4CERzJsgo+cAo2gE27nujHuBWsgC1NdhlPWMzOo/ EQ1B0ERyZMzkp13n8bDD9o/c3WPq2Paze3diRGnA+SYIgTWIYkLu8OD3QvZDnFeH4cmO tlzA== X-Gm-Message-State: AHYfb5hmmxQzFF0Tcq1bQolNKSWCnYtR+piIrog+yOY6uduO7YMZUt9z Gn4+Mvdv/2ukgERR7co= X-Received: by 10.107.183.197 with SMTP id h188mr2708193iof.61.1503988808014; Mon, 28 Aug 2017 23:40:08 -0700 (PDT) From: Ashish Mittal X-Google-Original-From: Ashish Mittal To: libvir-list@redhat.com, jferlan@redhat.com, pbonzini@redhat.com, berrange@redhat.com, jcody@redhat.com, ashish.mittal@veritas.com, stefanha@gmail.com, Ketan.Nilangekar@veritas.com, Nitin.Jerath@veritas.com, venkatesha.mg@veritas.com, pkrempa@redhat.com, areis@redhat.com, pchavva@redhat.com, ashmit602@gmail.com, Suraj.Singh@veritas.com Date: Mon, 28 Aug 2017 23:39:29 -0700 Message-Id: <1503988773-118859-6-git-send-email-Ashish.Mittal@veritas.com> In-Reply-To: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> References: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 29 Aug 2017 06:40:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 29 Aug 2017 06:40:09 +0000 (UTC) for IP:'209.85.223.195' DOMAIN:'mail-io0-f195.google.com' HELO:'mail-io0-f195.google.com' FROM:'ashmit602@gmail.com' RCPT:'' X-RedHat-Spam-Score: -2.16 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.223.195 mail-io0-f195.google.com 209.85.223.195 mail-io0-f195.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Ashish Mittal Subject: [libvirt] [PATCH v5 5/9] Add TLS support for Veritas HyperScale (VxHS) block device protocol 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.32]); Tue, 29 Aug 2017 06:40:34 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The following describes the behavior of TLS for VxHS block device: (1) Two new options have been added in /etc/libvirt/qemu.conf to control TLS behavior with VxHS block devices "vxhs_tls" and "vxhs_tls_x509_cert_dir". (2) Setting "vxhs_tls=3D1" in /etc/libvirt/qemu.conf will enable TLS for VxHS block devices. (3) "vxhs_tls_x509_cert_dir" can be set to the full path where the TLS certificates and keys are saved. If this value is missing, the "default_tls_x509_cert_dir" will be used instead. (4) If the value of "vxhs_tls" is set to 1, TLS creds will be added automatically on the qemu command line for every VxHS block device. (5) With "vxhs_tls=3D1", TLS may selectively be disabled on individual VxHS disks by specifying tls=3D'no' in the device domain specification. (6) Valid values for domain TLS setting are tls=3D'yes|no'. (7) tls=3D'yes' can only be specified if "vxhs_tls" is enabled. Specifying tls=3D'yes' when "vxhs_tls=3D0" results in an error. QEMU changes for VxHS (including TLS support) are already upstream. Sample TLS args generated by libvirt - -object tls-creds-x509,id=3Dobjvxhs_tls0,dir=3D/usr/local/etc/pki/qemu,\ endpoint=3Dclient,verify-peer=3Dyes \ -drive file.driver=3Dvxhs,file.tls-creds=3Dobjvxhs_tls0,\ file.vdisk-id=3Deb90327c-8302-4725-9e1b-4e85ed4dc251,\ file.server.host=3D192.168.0.1,file.server.port=3D9999,format=3Draw,if=3Dno= ne,\ id=3Ddrive-virtio-disk0,cache=3Dnone \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-disk0,\ id=3Dvirtio-disk0 Signed-off-by: Ashish Mittal --- v5 changelog: (1) The v4 3/3 patch has been split into smaller chunks. (2) Functionally there are no changes in TLS code yet. TODO: Changes to TLS functionality are pending. docs/schemas/domaincommon.rng | 5 ++++ src/conf/domain_conf.c | 19 ++++++++++++ src/qemu/qemu_block.c | 42 +++++++++++++++++++-------- src/qemu/qemu_command.c | 67 +++++++++++++++++++++++++++++++++++++++= ++++ src/util/virstoragefile.c | 13 +++++++++ src/util/virstoragefile.h | 9 ++++++ 6 files changed, 143 insertions(+), 12 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 458b8d8..af38c9a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1651,6 +1651,11 @@ + + + + + =20 diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 5bad397..f3fb3d0 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8017,6 +8017,7 @@ virDomainDiskSourceParse(xmlNodePtr node, int ret =3D -1; char *protocol =3D NULL; xmlNodePtr saveNode =3D ctxt->node; + char *haveTLS =3D NULL; =20 ctxt->node =3D node; =20 @@ -8050,6 +8051,19 @@ virDomainDiskSourceParse(xmlNodePtr node, goto cleanup; } =20 + /* Check tls=3Dyes|no domain setting for the block device */ + /* At present only VxHS. Other block devices may be added later */ + if ((haveTLS =3D virXMLPropString(node, "tls")) && + src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_VXHS) { + if ((src->haveTLS =3D + virTristateBoolTypeFromString(haveTLS)) <=3D 0) { + virReportError(VIR_ERR_XML_ERROR, + _("unknown VxHS 'tls' setting '%s'"), + haveTLS); + goto cleanup; + } + } + /* for historical reasons the volume name for gluster volume is st= ored * as a part of the path. This is hard to work with when dealing w= ith * relative names. Split out the volume into a separate variable */ @@ -8105,6 +8119,7 @@ virDomainDiskSourceParse(xmlNodePtr node, =20 cleanup: VIR_FREE(protocol); + VIR_FREE(haveTLS); ctxt->node =3D saveNode; return ret; } @@ -21534,6 +21549,10 @@ virDomainDiskSourceFormatNetwork(virBufferPtr buf, =20 VIR_FREE(path); =20 + if (src->haveTLS !=3D VIR_TRISTATE_BOOL_ABSENT) + virBufferAsprintf(buf, " tls=3D'%s'", + virTristateBoolTypeToString(src->haveTLS)); + if (src->nhosts =3D=3D 0 && !src->snapshot && !src->configFile) { virBufferAddLit(buf, "/>\n"); } else { diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index a4d0160..766d07f 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -519,20 +519,38 @@ qemuBlockStorageSourceGetVxHSProps(virStorageSourcePt= r src) if (!(server =3D qemuBuildVxHSDriveJSONHost(src))) return NULL; =20 - /* VxHS disk specification example: - * { driver:"vxhs", - * vdisk-id:"eb90327c-8302-4725-4e85ed4dc251", - * server.host:"1.2.3.4", - * server.port:1234} - */ - if (virJSONValueObjectCreate(&ret, - "s:driver", protocol, - "s:vdisk-id", src->path, - "a:server", server, NULL) < 0) { - virJSONValueFree(server); - ret =3D NULL; + if (src->addTLS =3D=3D true) { + char *objalias =3D NULL; + + if (!(objalias =3D qemuAliasTLSObjFromSrcAlias("vxhs"))) + goto cleanup; + + if (virJSONValueObjectCreate(&ret, + "s:driver", protocol, + "s:tls-creds", objalias, + "s:vdisk-id", src->path, + "a:server", server, NULL) < 0) { + virJSONValueFree(server); + ret =3D NULL; + } + VIR_FREE(objalias); + } else { + /* VxHS disk specification example: + * { driver:"vxhs", + * vdisk-id:"eb90327c-8302-4725-4e85ed4dc251", + * server.host:"1.2.3.4", + * server.port:1234} + */ + if (virJSONValueObjectCreate(&ret, + "s:driver", protocol, + "s:vdisk-id", src->path, + "a:server", server, NULL) < 0) { + virJSONValueFree(server); + ret =3D NULL; + } } =20 + cleanup: return ret; } =20 diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 0fd2674..384a489 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -791,6 +791,70 @@ qemuBuildTLSx509CommandLine(virCommandPtr cmd, } =20 =20 + +/* qemuBuildDiskVxHSTLSinfoCommandLine: + * @cmd: Pointer to the command string + * @cfg: Pointer to the qemu driver config + * @disk: The disk we are processing + * @qemuCaps: qemu capabilities object + * + * Check if the VxHS disk meets all the criteria to enable TLS. + * If yes, add a new TLS object and mention it's ID on the disk + * command line. + * + * Returns 0 on success, -1 w/ error on some sort of failure. + */ +static int +qemuBuildDiskVxHSTLSinfoCommandLine(virCommandPtr cmd, + virQEMUDriverConfigPtr cfg, + virDomainDiskDefPtr disk, + virQEMUCapsPtr qemuCaps) +{ + int ret =3D 0; + + if (cfg->vxhsTLS =3D=3D true && disk->src->haveTLS !=3D VIR_TRISTATE_= BOOL_NO) { + disk->src->addTLS =3D true; + ret =3D qemuBuildTLSx509CommandLine(cmd, cfg->vxhsTLSx509certd= ir, + false, + true, + false, + "vxhs", + qemuCaps); + } else if (cfg->vxhsTLS =3D=3D false && + disk->src->haveTLS =3D=3D VIR_TRISTATE_BOOL_YES) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Please enable VxHS specific TLS options in the q= emu " + "conf file before using TLS in VxHS device domain= " + "specification")); + ret =3D -1; + } + + return ret; +} + + +/* qemuBuildDiskTLSinfoCommandLine: + * + * Add TLS object if the disk uses a secure communication channel + * + * Returns 0 on success, -1 w/ error on some sort of failure. + */ +static int +qemuBuildDiskTLSinfoCommandLine(virCommandPtr cmd, + virQEMUDriverConfigPtr cfg, + virDomainDiskDefPtr disk, + virQEMUCapsPtr qemuCaps) +{ + virStorageSourcePtr src =3D disk->src; + + /* other protocols may be added later */ + if (src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_VXHS) + return qemuBuildDiskVxHSTLSinfoCommandLine(cmd, cfg, disk, qemuCap= s); + + return 0; +} + + static char * qemuBuildNetworkDriveURI(virStorageSourcePtr src, qemuDomainSecretInfoPtr secinfo) @@ -2218,6 +2282,9 @@ qemuBuildDiskDriveCommandLine(virCommandPtr cmd, if (qemuBuildDiskSecinfoCommandLine(cmd, encinfo) < 0) return -1; =20 + if (qemuBuildDiskTLSinfoCommandLine(cmd, cfg, disk, qemuCaps) < 0) + return -1; + virCommandAddArg(cmd, "-drive"); =20 if (!(optstr =3D qemuBuildDriveStr(disk, cfg, driveBoot, qemuCaps)= )) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index e9a59e0..d4f0fdb 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2039,6 +2039,8 @@ virStorageSourceCopy(const virStorageSource *src, ret->physical =3D src->physical; ret->readonly =3D src->readonly; ret->shared =3D src->shared; + ret->haveTLS =3D src->haveTLS; + ret->addTLS =3D src->addTLS; =20 /* storage driver metadata are not copied */ ret->drv =3D NULL; @@ -3219,6 +3221,7 @@ virStorageSourceParseBackingJSONVxHS(virStorageSource= Ptr src, { const char *vdisk_id =3D virJSONValueObjectGetString(json, "vdisk-id"); virJSONValuePtr server =3D virJSONValueObjectGetObject(json, "server"); + const char *haveTLS =3D virJSONValueObjectGetString(json, "tls"); =20 if (!vdisk_id || !server) { virReportError(VIR_ERR_INVALID_ARG, "%s", @@ -3227,6 +3230,16 @@ virStorageSourceParseBackingJSONVxHS(virStorageSourc= ePtr src, return -1; } =20 + if (haveTLS) { + if ((src->haveTLS =3D + virTristateBoolTypeFromString(haveTLS)) <=3D 0) { + virReportError(VIR_ERR_INVALID_ARG, + _("unknown VxHS 'tls' setting '%s'"), + haveTLS); + return -1; + } + } + src->type =3D VIR_STORAGE_TYPE_NETWORK; src->protocol =3D VIR_STORAGE_NET_PROTOCOL_VXHS; =20 diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index f7e897f..0f363a7 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -281,6 +281,15 @@ struct _virStorageSource { /* metadata that allows identifying given storage source */ char *nodeformat; /* name of the format handler object */ char *nodestorage; /* name of the storage object */ + + /* This is the domain specific setting. + * It may be absent */ + int haveTLS; /* enum virTristateBool */ + + /* This should be set to "true" only when TLS creds are to be added for + * the device. For e.g. this could be based on a combination of + * global conf setting + domain specific setting */ + bool addTLS; }; =20 =20 --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 19:39:41 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; dkim=fail; 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 1503988817682825.5083290145291; Mon, 28 Aug 2017 23:40:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C0956F0; Tue, 29 Aug 2017 06:40: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 4927D6BC01; Tue, 29 Aug 2017 06:40:15 +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 08BF61806106; Tue, 29 Aug 2017 06:40:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v7T6eDGn007000 for ; Tue, 29 Aug 2017 02:40:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id D5BC2171E0; Tue, 29 Aug 2017 06:40:13 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C731C5C588; Tue, 29 Aug 2017 06:40:13 +0000 (UTC) Received: from mail-io0-f195.google.com (mail-io0-f195.google.com [209.85.223.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93D14883DD; Tue, 29 Aug 2017 06:40:12 +0000 (UTC) Received: by mail-io0-f195.google.com with SMTP id s101so2592850ioe.0; Mon, 28 Aug 2017 23:40:12 -0700 (PDT) Received: from localhost.localdomain.localdomain ([172.58.73.57]) by smtp.gmail.com with ESMTPSA id u196sm479335itc.12.2017.08.28.23.40.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 23:40:10 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7C0956F0 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7C0956F0 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="txZZ06hG" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 93D14883DD Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ashmit602@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 93D14883DD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DDheRhx774PtMzBRKmJhym0LNLGJ8CqWHL0oWBF/54w=; b=txZZ06hG7NA3nkuNcuyDnjyP9QRAH6qKVv+WFK09R2cR01LKkJrcJE2HXcH+opsvZM cwLp6rzmsKlcMHsA0Wv+Y2IFTUR5YJOQ+QcaAUQiz2+o1Hz6O1/lLY+UneDyZ24X47C7 K9Wzq/LF+07++663hMW6iPDi1Zi8eNycPD8s9hNjwHapIUupHHUxo1BlunE2HQ0gmh7c uguCvhq1RCif13+1ftuLx7Q3pnghhwNrMnlA/ZWooio6hHStOZk1wBcLD5wSN+W/RIpQ 1RejyWYqYk59J6Pgb59oz2qziWL00601VAs8nYjvymixefi35nK4khDXDIG9iqMhPRj8 yA6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DDheRhx774PtMzBRKmJhym0LNLGJ8CqWHL0oWBF/54w=; b=bj+OKH5xaYQa+DgfBZmRK9qvQEL7WzNBPnhBGc6doYGdw5vnB0tDIXhgX8e8hHz18e OI4PgI0dX4Pg9yAVdTmACBj6Ua9jL+GKcQFfsWHiO9udDAAFnVr8yj++iD8E2i9iLTjY eXWl/2auZ+tRK/Z4CFHAjNHqpWCgGCf0wrPJFoJr0zajX8awC2rYNEvDdDjIPJMVwAoR bXiO7nXTWqTAKAgVYLcLYejbk53Vk0s5sPkoAkmTv6LjX8getQOiLMtzoFs6esovQKLF jtlZBs0My/cgw2jWuGVvI1AUUiSxJsBi+afAu6flZ9YCKAuxAsP+HYE5Y4Oa/4Ny3yKG IZxA== X-Gm-Message-State: AHYfb5iHX9b0ZBupR99D/cYKYYI31JX73MJKMWychnzK9F1kaq7iCBGC cXUAIWD6VUr246/qas4= X-Received: by 10.107.20.82 with SMTP id 79mr2761256iou.223.1503988811344; Mon, 28 Aug 2017 23:40:11 -0700 (PDT) From: Ashish Mittal X-Google-Original-From: Ashish Mittal To: libvir-list@redhat.com, jferlan@redhat.com, pbonzini@redhat.com, berrange@redhat.com, jcody@redhat.com, ashish.mittal@veritas.com, stefanha@gmail.com, Ketan.Nilangekar@veritas.com, Nitin.Jerath@veritas.com, venkatesha.mg@veritas.com, pkrempa@redhat.com, areis@redhat.com, pchavva@redhat.com, ashmit602@gmail.com, Suraj.Singh@veritas.com Date: Mon, 28 Aug 2017 23:39:30 -0700 Message-Id: <1503988773-118859-7-git-send-email-Ashish.Mittal@veritas.com> In-Reply-To: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> References: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 29 Aug 2017 06:40:12 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 29 Aug 2017 06:40:12 +0000 (UTC) for IP:'209.85.223.195' DOMAIN:'mail-io0-f195.google.com' HELO:'mail-io0-f195.google.com' FROM:'ashmit602@gmail.com' RCPT:'' X-RedHat-Spam-Score: -2.16 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.223.195 mail-io0-f195.google.com 209.85.223.195 mail-io0-f195.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Ashish Mittal Subject: [libvirt] [PATCH v5 6/9] Add a test case to verify TLS arguments are added for VxHS disk 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 29 Aug 2017 06:40:16 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Enable TLS for VxHS disks in qemu.conf and ensure that TLS arguments are added automatically on the qemu command line. Signed-off-by: Ashish Mittal --- ...muxml2argv-disk-drive-network-tlsx509-vxhs.args | 30 +++++++++++++++++++ ...emuxml2argv-disk-drive-network-tlsx509-vxhs.xml | 34 ++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 5 ++++ 3 files changed, 69 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-= tlsx509-vxhs.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-= tlsx509-vxhs.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509= -vxhs.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509= -vxhs.args new file mode 100644 index 0000000..e872042 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-vxhs.a= rgs @@ -0,0 +1,30 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-M pc \ +-cpu qemu32 \ +-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 tls-creds-x509,id=3Dobjvxhs_tls0,dir=3D/usr/local/etc/pki/qemu,\ +endpoint=3Dclient,verify-peer=3Dyes \ +-drive file.driver=3Dvxhs,file.tls-creds=3Dobjvxhs_tls0,\ +file.vdisk-id=3Deb90327c-8302-4725-9e1b-4e85ed4dc251,\ +file.server.host=3D192.168.0.1,file.server.port=3D9999,format=3Draw,if=3Dn= one,\ +id=3Ddrive-virtio-disk0,cache=3Dnone \ +-device virtio-blk-pci,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-disk0,\ +id=3Dvirtio-disk0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509= -vxhs.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-= vxhs.xml new file mode 100644 index 0000000..a488770 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-vxhs.x= ml @@ -0,0 +1,34 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + eb90327c-8302-4725-9e1b-4e85ed4dc251 + +
+ + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f7dbf39..57b838d 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -932,6 +932,11 @@ mymain(void) DO_TEST("disk-drive-network-rbd-ipv6", NONE); DO_TEST_FAILURE("disk-drive-network-rbd-no-colon", NONE); DO_TEST("disk-drive-network-vxhs", NONE); + driver.config->vxhsTLS =3D 1; + DO_TEST("disk-drive-network-tlsx509-vxhs", + QEMU_CAPS_OBJECT_TLS_CREDS_X509); + driver.config->vxhsTLS =3D 0; + VIR_FREE(driver.config->vxhsTLSx509certdir); DO_TEST("disk-drive-no-boot", QEMU_CAPS_BOOTINDEX); DO_TEST_PARSE_ERROR("disk-device-lun-type-invalid", --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 19:39:41 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; dkim=fail; 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 1503988827051870.7723991002721; Mon, 28 Aug 2017 23:40:27 -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 13490C049D7F; Tue, 29 Aug 2017 06:40:25 +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 CFED26FDBB; Tue, 29 Aug 2017 06:40:24 +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 9712E1806108; Tue, 29 Aug 2017 06:40:24 +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 v7T6eGAd007018 for ; Tue, 29 Aug 2017 02:40:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id B2F4D6BC02; Tue, 29 Aug 2017 06:40:16 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BABA6A77F; Tue, 29 Aug 2017 06:40:16 +0000 (UTC) Received: from mail-io0-f194.google.com (mail-io0-f194.google.com [209.85.223.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 934995F73B; Tue, 29 Aug 2017 06:40:15 +0000 (UTC) Received: by mail-io0-f194.google.com with SMTP id j99so2583974ioo.4; Mon, 28 Aug 2017 23:40:15 -0700 (PDT) Received: from localhost.localdomain.localdomain ([172.58.73.57]) by smtp.gmail.com with ESMTPSA id u196sm479335itc.12.2017.08.28.23.40.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 23:40:14 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 13490C049D7F Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 13490C049D7F Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HB3yi2BZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 934995F73B Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ashmit602@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 934995F73B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1zztIKYmNjlBaKvHvMJG+nqhqffDurVadb1pQauRuDM=; b=HB3yi2BZRvdjx2+FA96EdZi7LM6o1rlUhWK9ZlbA7nOaadXZaN8lXEjGGgo6YlD/BX rFd45admOSpRCh3OuNoBFl5lhFUv60BkjQMQEaWOvfIHK7GcvsxoHZPvFFx7ZUXt3p+Z bs0veSs07drC49+BYHjb4IBZci2vykFIiJrlHXcqXyUmt4e9ktl4K0jt8LNq0WyDD5hc 0MOHPxIzE0e8i8t6Bylg35k9xEGpdu5D5zLynSrRtYX6I8efLPmaUu/gWT14iEp3dUCm hKwVA0e6SJ2W2OynC1Fafu4o2ScPpvjhO91NdUMNDHauwm+NiOS9HeNuQKGZxlf0IERY 2EbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1zztIKYmNjlBaKvHvMJG+nqhqffDurVadb1pQauRuDM=; b=Nve/OAgK8ip0TS89PpJDRWPKWmqlIUtHcR3JjCTP/Bixiz97w7JoFWB6iQYuKnwRJ9 ZtdRLidsl6i/1as0z/QN4R/aryAK2xfL5I3zcdA4TK72qqcivFooUifIbntsfBYMFR+0 1EYxMiMcRhl6PbLgNIGIR7PO5iEZGDVzQL4DGes0zYux8rawrBpUFxCxG6Voeeh7WRjO ThBM4GhDXj08nrFNfxOeVDtxd6U82gWI5EC+hByLr28kvIki3Sq1pQAm4UHnpPeVrDdv 5vMEQhTBai4WdxuRMqwxXiCqrzZ6/Yl0FwnybuWLB4TM2duEgSN7FelpLG2Cn1wQ3yxH KK8A== X-Gm-Message-State: AHYfb5jm1jk5tHzEVvzyfE60JQKlcwV20NhBn0rci8yz7H/tuRxqV/yE sQ72qPdbbrz4Eth/XaI= X-Received: by 10.107.168.205 with SMTP id e74mr3117462ioj.141.1503988814684; Mon, 28 Aug 2017 23:40:14 -0700 (PDT) From: Ashish Mittal X-Google-Original-From: Ashish Mittal To: libvir-list@redhat.com, jferlan@redhat.com, pbonzini@redhat.com, berrange@redhat.com, jcody@redhat.com, ashish.mittal@veritas.com, stefanha@gmail.com, Ketan.Nilangekar@veritas.com, Nitin.Jerath@veritas.com, venkatesha.mg@veritas.com, pkrempa@redhat.com, areis@redhat.com, pchavva@redhat.com, ashmit602@gmail.com, Suraj.Singh@veritas.com Date: Mon, 28 Aug 2017 23:39:31 -0700 Message-Id: <1503988773-118859-8-git-send-email-Ashish.Mittal@veritas.com> In-Reply-To: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> References: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 29 Aug 2017 06:40:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 29 Aug 2017 06:40:15 +0000 (UTC) for IP:'209.85.223.194' DOMAIN:'mail-io0-f194.google.com' HELO:'mail-io0-f194.google.com' FROM:'ashmit602@gmail.com' RCPT:'' X-RedHat-Spam-Score: -2.66 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.223.194 mail-io0-f194.google.com 209.85.223.194 mail-io0-f194.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Ashish Mittal Subject: [libvirt] [PATCH v5 7/9] Add a test case to verify TLS arguments are parsed correctly for a VxHS disk 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]); Tue, 29 Aug 2017 06:40:25 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Test case verifies that XML is generated correctly for a VxHS disk having TLS enabled. Signed-off-by: Ashish Mittal --- tests/virstoragetest.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index f8444e1..92328ea 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -1595,6 +1595,17 @@ mymain(void) "\n" " \n" "\n"); + TEST_BACKING_PARSE("json:{\"file\":{\"driver\":\"vxhs\"," + "\"vdisk-id\":\"c6718f6b-0401-441d-= a8c3-1f0064d75ee0\"," + "\"server\": { \"host\":\"example.c= om\"," + "\"port\":\"1234\"" + "}," + "\"tls\":\"yes\"" + "}" + "}", + "\n" + " \n" + "\n"); #endif /* WITH_YAJL */ =20 cleanup: --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 19:39:41 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; dkim=fail; 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 1503988830314732.872938140503; Mon, 28 Aug 2017 23:40:30 -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 0D49580C1D; Tue, 29 Aug 2017 06:40:28 +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 DE6F94F9FC; Tue, 29 Aug 2017 06:40:27 +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 A81BF180610A; Tue, 29 Aug 2017 06:40:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v7T6eMYT007031 for ; Tue, 29 Aug 2017 02:40:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3C63361297; Tue, 29 Aug 2017 06:40:22 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 232A74FA22; Tue, 29 Aug 2017 06:40:20 +0000 (UTC) Received: from mail-io0-f196.google.com (mail-io0-f196.google.com [209.85.223.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0DB42C0587C8; Tue, 29 Aug 2017 06:40:19 +0000 (UTC) Received: by mail-io0-f196.google.com with SMTP id c18so2589873ioj.2; Mon, 28 Aug 2017 23:40:19 -0700 (PDT) Received: from localhost.localdomain.localdomain ([172.58.73.57]) by smtp.gmail.com with ESMTPSA id u196sm479335itc.12.2017.08.28.23.40.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 23:40:17 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0D49580C1D Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0D49580C1D Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hLp7JZJP" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0DB42C0587C8 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ashmit602@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0DB42C0587C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=y56Qvie9mlrjtkUodPqfZ1eRebufDHbaXGpbpibFiww=; b=hLp7JZJP/LYOO9RL9DFSG8v+Zvmrcq8nvK5SIXBkMJ+znboNHHatSsLDvC6XbXZSLd 4xmSmf1JuqGVA71IKQmpVzkiuDCxx/1CfizXX61jvwvxFsg3BmG7Cmiod31S3ldPUQLP zoTibUwtHKR0kCtt/GAhmmqeYqO88I+vGzMEeLg3Trq/extFTV1E16HCrVjYqxOWoAfL Nkowy2ybc5f7x4z8nDhKqbkG7nTEpkZb8u33YXQH+bRIrkJ/KGcyI43QJP7GqCYrIY7B ZtTKycXWzLNyvdFJLWDncDui4tkzcgAvaO5OonY2oWEbe9H91ObAOgK7fQc3pp6BdLda ZgQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=y56Qvie9mlrjtkUodPqfZ1eRebufDHbaXGpbpibFiww=; b=r0ys2VjtCS5Mx9w0LQcc0saxMoK1OLvDvZZXFOnX6v3n+c8oBQscksnOQs38CKlSpP sI51VFixnN5p1i0N7r5LLXBeYYxZFR0p91zFeQPMIfNs8AQZaT9PfPVt7imd+NMar+O+ qe5llst8xDA70/UHY07C8JfHhRp5Atq8UKCtB4b+LLzPXdNYMSg6V2WMEtw5L88ewZxL 3bwlsY0r0GgXidaABSLN94xt4IhtulECDTsAPRatPtVP2oTmx5NKKxDIROfS8TrUalkD +yw+SJyvgHf8KGL9PGkSmp/LLVT8Kgrah7/CMIeJFvxtSPctVTbP8x6WoqmRt6D/Nyff aB6A== X-Gm-Message-State: AHYfb5grrbTevhSrfH/dsrIUDI6RE71fcTkuCk5aNyo8l7v0tjq55ldv Db1qIIagk0l56lis1ak= X-Received: by 10.36.37.75 with SMTP id g72mr1151616itg.64.1503988818166; Mon, 28 Aug 2017 23:40:18 -0700 (PDT) From: Ashish Mittal X-Google-Original-From: Ashish Mittal To: libvir-list@redhat.com, jferlan@redhat.com, pbonzini@redhat.com, berrange@redhat.com, jcody@redhat.com, ashish.mittal@veritas.com, stefanha@gmail.com, Ketan.Nilangekar@veritas.com, Nitin.Jerath@veritas.com, venkatesha.mg@veritas.com, pkrempa@redhat.com, areis@redhat.com, pchavva@redhat.com, ashmit602@gmail.com, Suraj.Singh@veritas.com Date: Mon, 28 Aug 2017 23:39:32 -0700 Message-Id: <1503988773-118859-9-git-send-email-Ashish.Mittal@veritas.com> In-Reply-To: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> References: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 29 Aug 2017 06:40:19 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 29 Aug 2017 06:40:19 +0000 (UTC) for IP:'209.85.223.196' DOMAIN:'mail-io0-f196.google.com' HELO:'mail-io0-f196.google.com' FROM:'ashmit602@gmail.com' RCPT:'' X-RedHat-Spam-Score: -2.66 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.223.196 mail-io0-f196.google.com 209.85.223.196 mail-io0-f196.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Ashish Mittal Subject: [libvirt] [PATCH v5 8/9] Add a test case to verify setting vxhs_tls=0 disables TLS for VxHS disks 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.26]); Tue, 29 Aug 2017 06:40:28 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a test case to verify that if vxhs_tls is disabled in qemu.conf then adding "tls=3Dyes" in the domain XML generates an error. Signed-off-by: Ashish Mittal --- ...ml2argv-disk-drive-network-tlsx509-err-vxhs.xml | 34 ++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-= tlsx509-err-vxhs.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509= -err-vxhs.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx= 509-err-vxhs.xml new file mode 100644 index 0000000..951ad4e --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-err-vx= hs.xml @@ -0,0 +1,34 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + eb90327c-8302-4725-9e1b-4e85ed4dc251 + +
+ + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 57b838d..d9723c4 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -932,6 +932,8 @@ mymain(void) DO_TEST("disk-drive-network-rbd-ipv6", NONE); DO_TEST_FAILURE("disk-drive-network-rbd-no-colon", NONE); DO_TEST("disk-drive-network-vxhs", NONE); + DO_TEST_FAILURE("disk-drive-network-tlsx509-err-vxhs", + QEMU_CAPS_OBJECT_TLS_CREDS_X509); driver.config->vxhsTLS =3D 1; DO_TEST("disk-drive-network-tlsx509-vxhs", QEMU_CAPS_OBJECT_TLS_CREDS_X509); --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 19:39:41 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; dkim=fail; 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 1503988838897538.5304645049628; Mon, 28 Aug 2017 23:40:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E6ED07E445; Tue, 29 Aug 2017 06:40:36 +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 C1C561753E; Tue, 29 Aug 2017 06:40: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 7B96A1843762; Tue, 29 Aug 2017 06:40:36 +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 v7T6ePCQ007041 for ; Tue, 29 Aug 2017 02:40:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 91EFC6027D; Tue, 29 Aug 2017 06:40:25 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A33A60276; Tue, 29 Aug 2017 06:40:23 +0000 (UTC) Received: from mail-io0-f193.google.com (mail-io0-f193.google.com [209.85.223.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 76A69C04B928; Tue, 29 Aug 2017 06:40:22 +0000 (UTC) Received: by mail-io0-f193.google.com with SMTP id d81so1866278ioj.1; Mon, 28 Aug 2017 23:40:22 -0700 (PDT) Received: from localhost.localdomain.localdomain ([172.58.73.57]) by smtp.gmail.com with ESMTPSA id u196sm479335itc.12.2017.08.28.23.40.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 23:40:21 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E6ED07E445 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E6ED07E445 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y8dfI5rD" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 76A69C04B928 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ashmit602@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 76A69C04B928 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=n3mquzZY8Efw5OfnX/DfuksHA9U97CK/dBIjT+3Trkw=; b=Y8dfI5rDgVFLtTn7Ev9BLGGNWmsaVtEADK0wcvaOUK8aiWAb0LJopsvzVZk92iAKdI eCy3Wb+UmzTMej6fQ7bsH/gMVFnebKID10BHkTEhSxlC4wR1VnwR5916p7aRn/7V7oy3 9brz8kXYnZjl9UVJvWpn9Z7iA+Z/T2XVY1HDkY6sPseY2VF9j23vopaXJGa+femq7cmt 0AgN4ST7F0i2mtUjqtyk/M2Woe9H9YCw3Am7TKDrE4evSs7sVciWwgJ6ieR1nGdJd5VL eKjKCUJbkNDcyQkyE+HB+5kZdkbyVdh9jQynVCDpuLA5BpO2LxbFdKALiU2RcIOCNcbn wzvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=n3mquzZY8Efw5OfnX/DfuksHA9U97CK/dBIjT+3Trkw=; b=ALVI9WhiG0zeCLk9GPsSAKmMMb45WNJb0EAjnKb/ogYvjAjdpHLSNIQ6F/it85Cpdk OJtdXeGSbrsr3LvHRnSGG8aeGcu3nn2irK9lGNcuz8o2joLGP40L6FdH1oCPLazXIfWb K2pKLbmUvLHvi6snJ1wkRS+9DH1123F1rx7mEm3QuiY//0nry693N9KLHuO2H0JyoaVD rhaAtmvDH1qZ/U9ycW6dZ4Rbn+rtGDns55R3e9ponbq/cQ0MCU1ek+xQ2kwkqPw4DKvH ls4s/EtUKh2/IK1mhvTkXYwrpsusHT1dCP8VYIpzEVSy/vaTDhHSHlFjjaPCE+EEo8bL +4jw== X-Gm-Message-State: AHYfb5hyDauhzHKJa6VXgCnDdQotsNc/1GJ5q2sE/LgzYnZEqdALBAVd Csfgb7bbPE0Yip5f04w= X-Received: by 10.107.26.212 with SMTP id a203mr3043759ioa.208.1503988821548; Mon, 28 Aug 2017 23:40:21 -0700 (PDT) From: Ashish Mittal X-Google-Original-From: Ashish Mittal To: libvir-list@redhat.com, jferlan@redhat.com, pbonzini@redhat.com, berrange@redhat.com, jcody@redhat.com, ashish.mittal@veritas.com, stefanha@gmail.com, Ketan.Nilangekar@veritas.com, Nitin.Jerath@veritas.com, venkatesha.mg@veritas.com, pkrempa@redhat.com, areis@redhat.com, pchavva@redhat.com, ashmit602@gmail.com, Suraj.Singh@veritas.com Date: Mon, 28 Aug 2017 23:39:33 -0700 Message-Id: <1503988773-118859-10-git-send-email-Ashish.Mittal@veritas.com> In-Reply-To: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> References: <1503988773-118859-1-git-send-email-Ashish.Mittal@veritas.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 29 Aug 2017 06:40:22 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 29 Aug 2017 06:40:22 +0000 (UTC) for IP:'209.85.223.193' DOMAIN:'mail-io0-f193.google.com' HELO:'mail-io0-f193.google.com' FROM:'ashmit602@gmail.com' RCPT:'' X-RedHat-Spam-Score: -2.66 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.223.193 mail-io0-f193.google.com 209.85.223.193 mail-io0-f193.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Ashish Mittal Subject: [libvirt] [PATCH v5 9/9] Add a test case to verify different TLS combinations for a VxHS disk 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 29 Aug 2017 06:40:37 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Verifies TLS args are auto generated if enabled in qemu.conf Verifies TLS args are not generated if XML specifies tls=3D'no' Signed-off-by: Ashish Mittal --- ...-disk-drive-network-tlsx509-multidisk-vxhs.args | 43 +++++++++++++++++ ...v-disk-drive-network-tlsx509-multidisk-vxhs.xml | 56 ++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 2 + 3 files changed, 101 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-= tlsx509-multidisk-vxhs.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-= tlsx509-multidisk-vxhs.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509= -multidisk-vxhs.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-netwo= rk-tlsx509-multidisk-vxhs.args new file mode 100644 index 0000000..005ad78 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-multid= isk-vxhs.args @@ -0,0 +1,43 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-M pc \ +-cpu qemu32 \ +-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 tls-creds-x509,id=3Dobjvxhs_tls0,dir=3D/usr/local/etc/pki/qemu,\ +endpoint=3Dclient,verify-peer=3Dyes \ +-drive file.driver=3Dvxhs,file.tls-creds=3Dobjvxhs_tls0,\ +file.vdisk-id=3Deb90327c-8302-4725-9e1b-4e85ed4dc251,\ +file.server.host=3D192.168.0.1,file.server.port=3D9999,format=3Draw,if=3Dn= one,\ +id=3Ddrive-virtio-disk0,cache=3Dnone \ +-device virtio-blk-pci,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-disk0,\ +id=3Dvirtio-disk0 \ +-object tls-creds-x509,id=3Dobjvxhs_tls0,dir=3D/usr/local/etc/pki/qemu,\ +endpoint=3Dclient,verify-peer=3Dyes \ +-drive file.driver=3Dvxhs,file.tls-creds=3Dobjvxhs_tls0,\ +file.vdisk-id=3Deb90327c-8302-4725-9e1b-4e85ed4dc252,\ +file.server.host=3D192.168.0.2,file.server.port=3D9999,format=3Draw,if=3Dn= one,\ +id=3Ddrive-virtio-disk1,cache=3Dnone \ +-device virtio-blk-pci,bus=3Dpci.0,addr=3D0x5,drive=3Ddrive-virtio-disk1,\ +id=3Dvirtio-disk1 \ +-drive file.driver=3Dvxhs,file.vdisk-id=3Deb90327c-8302-4725-9e1b-4e85ed4d= c253,\ +file.server.host=3D192.168.0.3,file.server.port=3D9999,format=3Draw,if=3Dn= one,\ +id=3Ddrive-virtio-disk2,cache=3Dnone \ +-device virtio-blk-pci,bus=3Dpci.0,addr=3D0x6,drive=3Ddrive-virtio-disk2,\ +id=3Dvirtio-disk2 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509= -multidisk-vxhs.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-networ= k-tlsx509-multidisk-vxhs.xml new file mode 100644 index 0000000..3d28958 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-multid= isk-vxhs.xml @@ -0,0 +1,56 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + eb90327c-8302-4725-9e1b-4e85ed4dc251 + +
+ + + + + + + + + eb90327c-8302-4725-9e1b-4e85ed4dc252 + +
+ + + + + + + + + eb90327c-8302-4725-9e1b-4e85ed4dc252 + +
+ + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index d9723c4..bc9d3a2 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -937,6 +937,8 @@ mymain(void) driver.config->vxhsTLS =3D 1; DO_TEST("disk-drive-network-tlsx509-vxhs", QEMU_CAPS_OBJECT_TLS_CREDS_X509); + DO_TEST("disk-drive-network-tlsx509-multidisk-vxhs", + QEMU_CAPS_OBJECT_TLS_CREDS_X509); driver.config->vxhsTLS =3D 0; VIR_FREE(driver.config->vxhsTLSx509certdir); DO_TEST("disk-drive-no-boot", --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list