]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Do not report eof when processing monitor IO
authorJim Fehlig <jfehlig@suse.com>
Wed, 6 Oct 2021 04:23:51 +0000 (22:23 -0600)
committerJim Fehlig <jfehlig@suse.com>
Fri, 15 Oct 2021 17:16:31 +0000 (11:16 -0600)
commit2703b0b5bf2751d523a4d8d61901e473c92ba198
tree677b8135de6aa806ffbf527f50f393380f34a81b
parent0a9d5f87b97ec3fd586976e9739dd88b75e5ee70
qemu: Do not report eof when processing monitor IO

There have been countless reports from users concerned about the following
error reported by libvirtd when qemu domains are shutdown

internal error: End of file from qemu monitor

While the error is harmless, users often mistaken it for real problem with
their deployments. EOF from the monitor can't be entirely ignored since
other threads may be using the monitor and must be able to detect the EOF
condition.

One potential fix is to delay reporting EOF until the monitor is used
after EOF is detected. This patch adds a 'goteof' member to the
qemuMonitor structure, which is set when EOF is detected on the monitor
socket. If another thread later tries to send data on the monitor, the
EOF error is reported.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_monitor.c