[lxc-devel] [lxd/master] lxd/qmp: Ensure checkbuffer is called
stgraber on Github
lxc-bot at linuxcontainers.org
Sun Nov 1 04:28:06 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 469 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201031/18fa0345/attachment.bin>
-------------- next part --------------
From 902c64ca87f97d03e6b0648fb729c3530910273f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Sun, 1 Nov 2020 00:26:52 -0400
Subject: [PATCH] lxd/qmp: Ensure checkbuffer is called
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
VMs tend to have events every few seconds, as a result the timeout was
never hit and the agent never detected.
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxd/instance/drivers/qmp/monitor.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lxd/instance/drivers/qmp/monitor.go b/lxd/instance/drivers/qmp/monitor.go
index 3e4d3d1dd8..9a93911a5a 100644
--- a/lxd/instance/drivers/qmp/monitor.go
+++ b/lxd/instance/drivers/qmp/monitor.go
@@ -130,6 +130,9 @@ func (m *Monitor) run() error {
continue
}
+ // Check if the ringbuffer was updated (non-blocking).
+ go checkBuffer()
+
if m.eventHandler != nil {
m.eventHandler(e.Event, e.Data)
}
More information about the lxc-devel
mailing list