From 4c3635cc983b31a3da18dab816a17bf2884820c7 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Tue, 14 Mar 2023 10:46:12 +0100 Subject: [PATCH] libvirt-8.0.0-19.el8 --- ...mber-from-guest-query-vcpus-optional.patch | 46 +++++++++++++++++++ ...omain-Fix-logic-when-tainting-domain.patch | 39 ++++++++++++++++ libvirt.spec | 8 +++- 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 libvirt-qemu-agent-Make-fetching-of-can-offline-member-from-guest-query-vcpus-optional.patch create mode 100644 libvirt-qemu-domain-Fix-logic-when-tainting-domain.patch diff --git a/libvirt-qemu-agent-Make-fetching-of-can-offline-member-from-guest-query-vcpus-optional.patch b/libvirt-qemu-agent-Make-fetching-of-can-offline-member-from-guest-query-vcpus-optional.patch new file mode 100644 index 0000000..0842445 --- /dev/null +++ b/libvirt-qemu-agent-Make-fetching-of-can-offline-member-from-guest-query-vcpus-optional.patch @@ -0,0 +1,46 @@ +From c57b31305a7fc8c2a4d11e11e7a48c4826160fa2 Mon Sep 17 00:00:00 2001 +Message-Id: +From: Peter Krempa +Date: Wed, 1 Mar 2023 16:51:42 +0100 +Subject: [PATCH] qemu: agent: Make fetching of 'can-offline' member from + 'guest-query-vcpus' optional + +The 'can-offline' member is optional according to agent's schema and in +fact in certain cases it's not returned. Libvirt then spams the logs +if something is polling the bulk guest stats API. + +Noticed when going through oVirt logs which appears to call the bulk +stats API repeatedly. + +Instead of requiring it we simply reply that the vCPU can't be offlined. + +Signed-off-by: Peter Krempa +Reviewed-by: Laine Stump +(cherry picked from commit 790ea58153b9ef1120a577d1a87a4ca2e988ee5c) +https://bugzilla.redhat.com/show_bug.cgi?id=2174447 +--- + src/qemu/qemu_agent.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c +index db844148a6..09b7340bc8 100644 +--- a/src/qemu/qemu_agent.c ++++ b/src/qemu/qemu_agent.c +@@ -1371,12 +1371,8 @@ qemuAgentGetVCPUs(qemuAgent *agent, + return -1; + } + +- if (virJSONValueObjectGetBoolean(entry, "can-offline", +- &in->offlinable) < 0) { +- virReportError(VIR_ERR_INTERNAL_ERROR, "%s", +- _("'can-offline' missing in reply of guest-get-vcpus")); +- return -1; +- } ++ in->offlinable = false; ++ ignore_value(virJSONValueObjectGetBoolean(entry, "can-offline", &in->offlinable)); + } + + return ndata; +-- +2.39.2 + diff --git a/libvirt-qemu-domain-Fix-logic-when-tainting-domain.patch b/libvirt-qemu-domain-Fix-logic-when-tainting-domain.patch new file mode 100644 index 0000000..920db5c --- /dev/null +++ b/libvirt-qemu-domain-Fix-logic-when-tainting-domain.patch @@ -0,0 +1,39 @@ +From 521e9a7731ac678ca790da4b04dabe4369efb984 Mon Sep 17 00:00:00 2001 +Message-Id: <521e9a7731ac678ca790da4b04dabe4369efb984@dist-git> +From: Peter Krempa +Date: Wed, 1 Mar 2023 17:09:42 +0100 +Subject: [PATCH] qemu: domain: Fix logic when tainting domain + +Originally the code was skipping all repeated taints with the same taint +flag but a logic bug introduced in commit 30626ed15b239c424ae inverted +the condition. This caused that actually the first occurence was NOT +logged but any subsequent was. + +This was noticed when going through oVirt logs as they use custom guest +agent commands and the logs are totally spammed with this message. + +Fixes: 30626ed15b239c424ae891f096057a696eadd715 +Signed-off-by: Peter Krempa +Reviewed-by: Laine Stump +(cherry picked from commit 9134b40d0b43a5e1a9928b0a0d948205941d9807) +https://bugzilla.redhat.com/show_bug.cgi?id=2174447 +--- + src/qemu/qemu_domain.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c +index c24d1e4d53..c70661fc49 100644 +--- a/src/qemu/qemu_domain.c ++++ b/src/qemu/qemu_domain.c +@@ -6369,7 +6369,7 @@ void qemuDomainObjTaintMsg(virQEMUDriver *driver, + const char *extrasuffix = ""; + va_list args; + +- if (virDomainObjTaint(obj, taint)) { ++ if (!virDomainObjTaint(obj, taint)) { + /* If an extra message was given we must always + * emit the taint warning, otherwise it is a + * one-time only warning per VM +-- +2.39.2 + diff --git a/libvirt.spec b/libvirt.spec index e8855da..bf8f899 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -210,7 +210,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 8.0.0 -Release: 18%{?dist}%{?extra_release} +Release: 19%{?dist}%{?extra_release} License: LGPLv2+ URL: https://libvirt.org/ @@ -304,6 +304,8 @@ Patch81: libvirt-rpc-Fix-memory-leak-of-fds.patch Patch82: libvirt-qemu_namespace-Don-t-leak-memory-in-qemuDomainGetPreservedMounts.patch Patch83: libvirt-vircpi-Add-PCIe-5.0-and-6.0-link-speeds.patch Patch84: libvirt-conf-Make-VIR_DOMAIN_NET_TYPE_ETHERNET-not-share-host-view.patch +Patch85: libvirt-qemu-domain-Fix-logic-when-tainting-domain.patch +Patch86: libvirt-qemu-agent-Make-fetching-of-can-offline-member-from-guest-query-vcpus-optional.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -2183,6 +2185,10 @@ exit 0 %changelog +* Tue Mar 14 2023 Jiri Denemark - 8.0.0-19 +- qemu: domain: Fix logic when tainting domain (rhbz#2174447) +- qemu: agent: Make fetching of 'can-offline' member from 'guest-query-vcpus' optional (rhbz#2174447) + * Wed Mar 1 2023 Jiri Denemark - 8.0.0-18 - conf: Make VIR_DOMAIN_NET_TYPE_ETHERNET not share 'host view' (rhbz#2172578)