On 10/24/2014 02:56 PM, Eric Blake wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1140981 reports that
the qemu-kvm shipped as part of RHEL 7.0 intentionally cripples
block jobs by removing the 'block-stream' QMP command, but that
our probe for whether block jobs work was merely whether
'block-job-cancel' exists. As the crippling did not remove
job cancellation, we end up trying the qemu command and printing
an ugly message:
error: Requested operation is not valid: Command 'block-stream' is not found
even though our code base was already prepared to print a nice
message that jobs are unsupported:
error: unsupported configuration: block jobs not supported with this qemu binary
Doing one more QMP probe lets us match the reality of crippled qemu.
Yes, we really have to cater to two spellings of the command, due to
older upstream qemu.
* src/qemu/qemu_capabilities.h (QEMU_CAPS_BLOCK_STREAM): New probe.
* src/qemu/qemu_capabilities.c (virQEMUCapsProbeQMPCommands): Kill
block jobs with nice error message if qemu is crippled.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 11 +++++++++++
src/qemu/qemu_capabilities.h | 1 +
2 files changed, 12 insertions(+)
Even smaller diffstat proposed as v3:
https://www.redhat.com/archives/libvir-list/2014-October/msg00882.html
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org