|
|
3a9410 |
From c57b31305a7fc8c2a4d11e11e7a48c4826160fa2 Mon Sep 17 00:00:00 2001
|
|
|
3a9410 |
Message-Id: <c57b31305a7fc8c2a4d11e11e7a48c4826160fa2@dist-git>
|
|
|
3a9410 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
3a9410 |
Date: Wed, 1 Mar 2023 16:51:42 +0100
|
|
|
3a9410 |
Subject: [PATCH] qemu: agent: Make fetching of 'can-offline' member from
|
|
|
3a9410 |
'guest-query-vcpus' optional
|
|
|
3a9410 |
|
|
|
3a9410 |
The 'can-offline' member is optional according to agent's schema and in
|
|
|
3a9410 |
fact in certain cases it's not returned. Libvirt then spams the logs
|
|
|
3a9410 |
if something is polling the bulk guest stats API.
|
|
|
3a9410 |
|
|
|
3a9410 |
Noticed when going through oVirt logs which appears to call the bulk
|
|
|
3a9410 |
stats API repeatedly.
|
|
|
3a9410 |
|
|
|
3a9410 |
Instead of requiring it we simply reply that the vCPU can't be offlined.
|
|
|
3a9410 |
|
|
|
3a9410 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
3a9410 |
Reviewed-by: Laine Stump <laine@redhat.com>
|
|
|
3a9410 |
(cherry picked from commit 790ea58153b9ef1120a577d1a87a4ca2e988ee5c)
|
|
|
3a9410 |
https://bugzilla.redhat.com/show_bug.cgi?id=2174447
|
|
|
3a9410 |
---
|
|
|
3a9410 |
src/qemu/qemu_agent.c | 8 ++------
|
|
|
3a9410 |
1 file changed, 2 insertions(+), 6 deletions(-)
|
|
|
3a9410 |
|
|
|
3a9410 |
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
|
|
|
3a9410 |
index db844148a6..09b7340bc8 100644
|
|
|
3a9410 |
--- a/src/qemu/qemu_agent.c
|
|
|
3a9410 |
+++ b/src/qemu/qemu_agent.c
|
|
|
3a9410 |
@@ -1371,12 +1371,8 @@ qemuAgentGetVCPUs(qemuAgent *agent,
|
|
|
3a9410 |
return -1;
|
|
|
3a9410 |
}
|
|
|
3a9410 |
|
|
|
3a9410 |
- if (virJSONValueObjectGetBoolean(entry, "can-offline",
|
|
|
3a9410 |
- &in->offlinable) < 0) {
|
|
|
3a9410 |
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
|
3a9410 |
- _("'can-offline' missing in reply of guest-get-vcpus"));
|
|
|
3a9410 |
- return -1;
|
|
|
3a9410 |
- }
|
|
|
3a9410 |
+ in->offlinable = false;
|
|
|
3a9410 |
+ ignore_value(virJSONValueObjectGetBoolean(entry, "can-offline", &in->offlinable));
|
|
|
3a9410 |
}
|
|
|
3a9410 |
|
|
|
3a9410 |
return ndata;
|
|
|
3a9410 |
--
|
|
|
3a9410 |
2.39.2
|
|
|
3a9410 |
|