libvirt-10.5.0-3.el9
- vmx: Be even more lax when trying to comprehend serial ports (RHEL-32182) Resolves: RHEL-32182
This commit is contained in:
parent
cfcbc697e0
commit
5c3ebb9dd9
@ -0,0 +1,97 @@
|
|||||||
|
From b65fb6c87242f9bdb55821217da941c33ec245d5 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <b65fb6c87242f9bdb55821217da941c33ec245d5.1721637067.git.jdenemar@redhat.com>
|
||||||
|
From: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
Date: Fri, 12 Jul 2024 10:36:37 +0200
|
||||||
|
Subject: [PATCH] vmx: Be even more lax when trying to comprehend serial ports
|
||||||
|
|
||||||
|
So much can happen in the fileName field of the VMX that the easiest
|
||||||
|
thing is to silently report a serial type="null".
|
||||||
|
|
||||||
|
This effectively reverts commits de81bdb8d4cd and 62c53db0421a, but
|
||||||
|
keeps the test files to show the fix is still in place.
|
||||||
|
|
||||||
|
There is one instance where an error gets reset, but since that is a
|
||||||
|
rare case on its own and on top of that does not happen in any of our
|
||||||
|
long-running daemons with a logfile that might get monitored it should
|
||||||
|
be fine to leave it there.
|
||||||
|
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-32182
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit 239669049d9904e5e8da2d8b2a38d4d927a167e9)
|
||||||
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
---
|
||||||
|
src/vmx/vmx.c | 30 +++++++++++++-----------------
|
||||||
|
1 file changed, 13 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
|
||||||
|
index e5bc2d793c..227744d062 100644
|
||||||
|
--- a/src/vmx/vmx.c
|
||||||
|
+++ b/src/vmx/vmx.c
|
||||||
|
@@ -2975,9 +2975,6 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf, int port,
|
||||||
|
char fileName_name[48] = "";
|
||||||
|
g_autofree char *fileName = NULL;
|
||||||
|
|
||||||
|
- char vspc_name[48] = "";
|
||||||
|
- g_autofree char *vspc = NULL;
|
||||||
|
-
|
||||||
|
char network_endPoint_name[48] = "";
|
||||||
|
g_autofree char *network_endPoint = NULL;
|
||||||
|
|
||||||
|
@@ -3000,7 +2997,6 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf, int port,
|
||||||
|
VMX_BUILD_NAME(startConnected);
|
||||||
|
VMX_BUILD_NAME(fileType);
|
||||||
|
VMX_BUILD_NAME(fileName);
|
||||||
|
- VMX_BUILD_NAME(vspc);
|
||||||
|
VMX_BUILD_NAME_EXTRA(network_endPoint, "network.endPoint");
|
||||||
|
|
||||||
|
/* vmx:present */
|
||||||
|
@@ -3030,10 +3026,6 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf, int port,
|
||||||
|
if (virVMXGetConfigString(conf, fileName_name, &fileName, true) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
- /* vmx:fileName -> def:data.file.path */
|
||||||
|
- if (virVMXGetConfigString(conf, vspc_name, &vspc, true) < 0)
|
||||||
|
- goto cleanup;
|
||||||
|
-
|
||||||
|
/* vmx:network.endPoint -> def:data.tcp.listen */
|
||||||
|
if (virVMXGetConfigString(conf, network_endPoint_name, &network_endPoint,
|
||||||
|
true) < 0) {
|
||||||
|
@@ -3065,21 +3057,25 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf, int port,
|
||||||
|
(*def)->target.port = port;
|
||||||
|
(*def)->source->type = VIR_DOMAIN_CHR_TYPE_PIPE;
|
||||||
|
(*def)->source->data.file.path = g_steal_pointer(&fileName);
|
||||||
|
- } else if (STRCASEEQ(fileType, "network") && (vspc || !fileName || STREQ(fileName, ""))) {
|
||||||
|
- (*def)->target.port = port;
|
||||||
|
- (*def)->source->type = VIR_DOMAIN_CHR_TYPE_NULL;
|
||||||
|
} else if (STRCASEEQ(fileType, "network")) {
|
||||||
|
(*def)->target.port = port;
|
||||||
|
(*def)->source->type = VIR_DOMAIN_CHR_TYPE_TCP;
|
||||||
|
|
||||||
|
- if (!(parsedUri = virURIParse(fileName)))
|
||||||
|
- goto cleanup;
|
||||||
|
+ if (!(parsedUri = virURIParse(fileName))) {
|
||||||
|
+ /*
|
||||||
|
+ * Ignore anything we cannot parse since there are many variations
|
||||||
|
+ * that could lead to unusable or non-representable serial ports
|
||||||
|
+ * which are very commonly seen and the main consumer of this driver
|
||||||
|
+ * (virt-v2v) ignores them anyway, so let's at least not error out.
|
||||||
|
+ */
|
||||||
|
+ virResetLastError();
|
||||||
|
+ (*def)->source->type = VIR_DOMAIN_CHR_TYPE_NULL;
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if (parsedUri->port == 0) {
|
||||||
|
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
- _("VMX entry '%1$s' doesn't contain a port part"),
|
||||||
|
- fileName_name);
|
||||||
|
- goto cleanup;
|
||||||
|
+ (*def)->source->type = VIR_DOMAIN_CHR_TYPE_NULL;
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
(*def)->source->data.tcp.host = g_strdup(parsedUri->server);
|
||||||
|
--
|
||||||
|
2.45.2
|
@ -289,7 +289,7 @@
|
|||||||
Summary: Library providing a simple virtualization API
|
Summary: Library providing a simple virtualization API
|
||||||
Name: libvirt
|
Name: libvirt
|
||||||
Version: 10.5.0
|
Version: 10.5.0
|
||||||
Release: 2%{?dist}%{?extra_release}
|
Release: 3%{?dist}%{?extra_release}
|
||||||
License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
|
License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
|
||||||
URL: https://libvirt.org/
|
URL: https://libvirt.org/
|
||||||
|
|
||||||
@ -305,6 +305,7 @@ Patch5: libvirt-qemu-do-not-use-deprecated-options-for-new-virtiofsd.patch
|
|||||||
Patch6: libvirt-qemu-migration-allow-migration-for-virtiofs.patch
|
Patch6: libvirt-qemu-migration-allow-migration-for-virtiofs.patch
|
||||||
Patch7: libvirt-virt-host-validate-Drop-extra-PASS.patch
|
Patch7: libvirt-virt-host-validate-Drop-extra-PASS.patch
|
||||||
Patch8: libvirt-qemu-Don-t-leave-beingDestroyed-true-on-inactive-domain.patch
|
Patch8: libvirt-qemu-Don-t-leave-beingDestroyed-true-on-inactive-domain.patch
|
||||||
|
Patch9: libvirt-vmx-Be-even-more-lax-when-trying-to-comprehend-serial-ports.patch
|
||||||
|
|
||||||
|
|
||||||
Requires: libvirt-daemon = %{version}-%{release}
|
Requires: libvirt-daemon = %{version}-%{release}
|
||||||
@ -2633,6 +2634,9 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 22 2024 Jiri Denemark <jdenemar@redhat.com> - 10.5.0-3
|
||||||
|
- vmx: Be even more lax when trying to comprehend serial ports (RHEL-32182)
|
||||||
|
|
||||||
* Fri Jul 12 2024 Jiri Denemark <jdenemar@redhat.com> - 10.5.0-2
|
* Fri Jul 12 2024 Jiri Denemark <jdenemar@redhat.com> - 10.5.0-2
|
||||||
- vmx: Do not require all ID data for VMWare Distributed Switch (RHEL-46099)
|
- vmx: Do not require all ID data for VMWare Distributed Switch (RHEL-46099)
|
||||||
- tests: vhostuser: add virtiofsd json descriptor (RHEL-7108, RHEL-40135)
|
- tests: vhostuser: add virtiofsd json descriptor (RHEL-7108, RHEL-40135)
|
||||||
|
Loading…
Reference in New Issue
Block a user