[libvirt] [PATCH] qemu: agent: Fix incorrect and weird debug/warning log entries

Replace the nonsensical debug statement by adding the expected event code into the existing debug statement. Since the monitor code always notifies the agent on guest reboot/shutdown even if that was not initiated by the agent the warning emitted later is bogus and pollutes the logs in such cases. Delete it and keep just the original debug message where this info can be inferred. --- src/qemu/qemu_agent.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index bee8d4c..559d79f 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -1230,19 +1230,14 @@ qemuAgentMakeStringsArray(const char **strings, unsigned int len) void qemuAgentNotifyEvent(qemuAgentPtr mon, qemuAgentEvent event) { - VIR_DEBUG("mon=%p event=%d", mon, event); + VIR_DEBUG("mon=%p event=%d await_event=%d", mon, event, mon->await_event); if (mon->await_event == event) { - VIR_DEBUG("Waking up a tragedian"); mon->await_event = QEMU_AGENT_EVENT_NONE; /* somebody waiting for this event, wake him up. */ if (mon->msg && !mon->msg->finished) { mon->msg->finished = 1; virCondSignal(&mon->notify); } - } else { - /* shouldn't happen but one never knows */ - VIR_WARN("Received unexpected event %d (expected %d)", - event, mon->await_event); } } -- 2.8.0

On Fri, Apr 08, 2016 at 10:15:58AM +0200, Peter Krempa wrote:
Replace the nonsensical debug statement by adding the expected event code into the existing debug statement.
Since the monitor code always notifies the agent on guest reboot/shutdown even if that was not initiated by the agent the warning emitted later is bogus and pollutes the logs in such cases. Delete it and keep just the original debug message where this info can be inferred.
Is there a public bug you could link here?
--- src/qemu/qemu_agent.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
ACK Jan

On Fri, Apr 08, 2016 at 17:16:15 +0200, Ján Tomko wrote:
On Fri, Apr 08, 2016 at 10:15:58AM +0200, Peter Krempa wrote:
Replace the nonsensical debug statement by adding the expected event code into the existing debug statement.
Since the monitor code always notifies the agent on guest reboot/shutdown even if that was not initiated by the agent the warning emitted later is bogus and pollutes the logs in such cases. Delete it and keep just the original debug message where this info can be inferred.
Is there a public bug you could link here?
I found it while looking at the code, thus I don't have any BZ.
--- src/qemu/qemu_agent.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
ACK
Pushed; Thanks. Peter
participants (2)
-
Ján Tomko
-
Peter Krempa