]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Suppress error reporting from qemuMonitorDelObject in cleanup paths
authorPeter Krempa <pkrempa@redhat.com>
Wed, 18 Mar 2020 11:24:40 +0000 (12:24 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 19 Mar 2020 08:57:46 +0000 (09:57 +0100)
commit64ed4d00c4c04c462aa19426797f2c949ca1cbc8
tree1fdd24d3ea57d3e91b4a450b86fbdacba9a248b9
parent103bfbfd74c91de2e31711b8444b89b5834718e2
qemu: Suppress error reporting from qemuMonitorDelObject in cleanup paths

Many calls of qemuMonitorDelObject don't actually check the return value
or report the error from the object deletion itself since they are on
cleanup paths. In some cases this can lead to reporting of spurious
errors e.g. when qemuMonitorDelObject is used to clean up a possibly
pre-existing objects.

Add a new argument for qemuMonitorDelObject which controls whether
the internals report errors from qemu and fix all callers accordingly.

Note that some of the cases on device unplug which check the error code
don't in fact propagate the error to the user, but in this case it is
important to add the log entry anyways for tracing that the device
deletion failed.

https://bugzilla.redhat.com/show_bug.cgi?id=1784040

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_driver.c
src/qemu/qemu_hotplug.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h