[PATCH 3/4] qemu: domain: Fix logic when tainting domain

Peter Krempa pkrempa at redhat.com
Wed Mar 1 16:28:39 UTC 2023


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 <pkrempa at redhat.com>
---
 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 4cf9a259ea..40d5efd750 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -6663,7 +6663,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



More information about the libvir-list mailing list