From: Peter Krempa <pkre...@redhat.com> qemu-5.2 dropped support for the 'vxhs' protocol. We require qemu-5.2 since commit ce48d584cc4 and thus the block code for vxhs is now dead. Remove it.
Signed-off-by: Peter Krempa <pkre...@redhat.com> --- src/qemu/qemu_block.c | 41 +---------------------------------------- src/qemu/qemu_domain.c | 37 +------------------------------------ 2 files changed, 2 insertions(+), 76 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index b1f50b6c67..32568d4ae6 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -426,41 +426,6 @@ qemuBlockStorageSourceGetGlusterProps(virStorageSource *src, } -static virJSONValue * -qemuBlockStorageSourceGetVxHSProps(virStorageSource *src, - bool onlytarget) -{ - g_autoptr(virJSONValue) server = NULL; - const char *tlsAlias = src->tlsAlias; - virJSONValue *ret = NULL; - - if (src->nhosts != 1) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("VxHS protocol accepts only one host")); - return NULL; - } - - if (!(server = qemuBlockStorageSourceBuildJSONInetSocketAddress(&src->hosts[0]))) - return NULL; - - if (onlytarget) - tlsAlias = NULL; - - /* VxHS disk specification example: - * { driver:"vxhs", - * tls-creds:"objvirtio-disk0_tls0", - * vdisk-id:"eb90327c-8302-4725-4e85ed4dc251", - * server:{type:"tcp", host:"1.2.3.4", port:9999}} - */ - ignore_value(virJSONValueObjectAdd(&ret, - "S:tls-creds", tlsAlias, - "s:vdisk-id", src->path, - "a:server", &server, NULL)); - - return ret; -} - - static virJSONValue * qemuBlockStorageSourceGetNFSProps(virStorageSource *src) { @@ -1088,11 +1053,6 @@ qemuBlockStorageSourceGetBackendProps(virStorageSource *src, return NULL; break; - case VIR_STORAGE_NET_PROTOCOL_VXHS: - driver = "vxhs"; - if (!(fileprops = qemuBlockStorageSourceGetVxHSProps(src, onlytarget))) - return NULL; - break; case VIR_STORAGE_NET_PROTOCOL_HTTP: case VIR_STORAGE_NET_PROTOCOL_HTTPS: @@ -1134,6 +1094,7 @@ qemuBlockStorageSourceGetBackendProps(virStorageSource *src, return NULL; break; + case VIR_STORAGE_NET_PROTOCOL_VXHS: case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG: virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("unsupported disk protocol")); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 230dc86038..ace42b516a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8798,40 +8798,6 @@ qemuDomainPrepareChardevSourceOne(virDomainDeviceDef *dev, } -static int -qemuProcessPrepareStorageSourceTLSVxhs(virStorageSource *src, - virQEMUDriverConfig *cfg, - qemuDomainObjPrivate *priv, - const char *parentAlias) -{ - /* VxHS uses only client certificates and thus has no need for - * the server-key.pem nor a secret that could be used to decrypt - * the it, so no need to add a secinfo for a secret UUID. */ - if (src->haveTLS == VIR_TRISTATE_BOOL_ABSENT) { - if (cfg->vxhsTLS) - src->haveTLS = VIR_TRISTATE_BOOL_YES; - else - src->haveTLS = VIR_TRISTATE_BOOL_NO; - src->tlsFromConfig = true; - } - - if (src->haveTLS == VIR_TRISTATE_BOOL_YES) { - src->tlsAlias = qemuAliasTLSObjFromSrcAlias(parentAlias); - src->tlsCertdir = g_strdup(cfg->vxhsTLSx509certdir); - - if (cfg->vxhsTLSx509secretUUID) { - qemuDomainStorageSourcePrivate *srcpriv = qemuDomainStorageSourcePrivateFetch(src); - - if (!(srcpriv->tlsKeySecret = qemuDomainSecretInfoTLSNew(priv, src->tlsAlias, - cfg->vxhsTLSx509secretUUID))) - return -1; - } - } - - return 0; -} - - static int qemuProcessPrepareStorageSourceTLSNBD(virStorageSource *src, virQEMUDriverConfig *cfg, @@ -8958,8 +8924,7 @@ qemuDomainPrepareStorageSourceTLS(virStorageSource *src, switch ((virStorageNetProtocol) src->protocol) { case VIR_STORAGE_NET_PROTOCOL_VXHS: - if (qemuProcessPrepareStorageSourceTLSVxhs(src, cfg, priv, parentAlias) < 0) - return -1; + /* vxhs is no longer supported */ break; case VIR_STORAGE_NET_PROTOCOL_NBD: -- 2.49.0