Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1140981 - Libvirt should post more accurate error when do blockpull with qemu-kvm
Libvirt should post more accurate error when do blockpull with qemu-kvm
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.1
Unspecified Unspecified
low Severity medium
: rc
: ---
Assigned To: Eric Blake
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-12 03:24 EDT by Shanzhi Yu
Modified: 2015-03-05 02:44 EST (History)
6 users (show)

See Also:
Fixed In Version: libvirt-1.2.8-6.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1156635 (view as bug list)
Environment:
Last Closed: 2015-03-05 02:44:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 07:10:54 EST

  None (edit)
Description Shanzhi Yu 2014-09-12 03:24:28 EDT
Description of problem:

Libvirt should post more accurate error when do blockpull with qemu-kvm

Version-Release number of selected component (if applicable):

libvirt-1.2.8-2.el7.x86_64
qemu-kvm-1.5.3-69.el7.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Prepare a backing chains

# qemu-img create -f qcow2 /var/lib/libvirt/images/base.img 10G ;qemu-img create -f qcow2 /var/lib/libvirt/images/base.s1 10G -b /var/lib/libvirt/images/base.img -o backing_fmt=qcow2;qemu-img create -f qcow2 /var/lib/libvirt/images/base.s2 10G -b /var/lib/libvirt/images/base.s1 -o backing_fmt=qcow2


Formatting '/var/lib/libvirt/images/base.img', fmt=qcow2 size=10737418240 encryption=off cluster_size=65536 lazy_refcounts=off
Formatting '/var/lib/libvirt/images/base.s1', fmt=qcow2 size=10737418240 backing_file='/var/lib/libvirt/images/base.img' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
Formatting '/var/lib/libvirt/images/base.s2', fmt=qcow2 size=10737418240 backing_file='/var/lib/libvirt/images/base.s1' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off

 2. Install guest with base.s2 as source file

# virsh list && virsh domblklist rhel7
 Id    Name                           State
----------------------------------------------------
 52    rhel7                          running

Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/base.s2

3. Try to do blockpull

# virsh blockpull rhel7 vda --active

error: Requested operation is not valid: Command 'block-stream' is not found

#virsh blockpull rhel7 vda --base /var/lib/libvirt/images/base.s1

error: Requested operation is not valid: Command 'block-stream' is not found


Actual results:


Expected results:

Since block-stream is not supported on qemu-kvm, so libvirt should post more accurate
error like "error: unsupported configuration: block pull is not supported with this QEMU binary"

Additional info:

#virsh blockcopy rhel6 vda /var/lib/libvirt/images/copy.img --wait
error: unsupported configuration: block copy is not supported with this QEMU binary

#virsh blockcommit rhel6 vda --active
error: unsupported configuration: online commit not supported with this QEMU binary
Comment 2 Eric Blake 2014-10-24 16:40:13 EDT
Uggh.  The problem is because RHEL ships 'block-job-cancel' even though it cripples out 'block-stream', but the libvirt code was assuming that either both commands are present, or neither.  I'm half tempted to reassign this to qemu to have them rework the crippling code to hide 'block-job-cancel', then libvirt will just work.
Comment 3 Eric Blake 2014-10-24 16:56:44 EDT
Libvirt upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2014-October/msg00784.html
Comment 4 Eric Blake 2014-10-28 10:33:24 EDT
Upstream proposal now at v3:
https://www.redhat.com/archives/libvir-list/2014-October/msg00882.html
Comment 5 Eric Blake 2014-10-28 10:34:41 EDT
bug 1156635 is a qemu bug that would also solve the problem (either fix in isolation would cause libvirt to give a nicer message, but both bugs are probably worth fixing)
Comment 8 yangyang 2014-12-16 04:44:30 EST
Verified it with the following component
libvirt-1.2.8-10.el7.x86_64
qemu-kvm-1.5.3-82.el7.x86_64

1. create 2 backing image
# qemu-img create -f qcow2 /var/lib/libvirt/images/base.s1 8G -b /var/lib/libvirt/images/vm1.qcow2 -o backing_fmt=qcow2;qemu-img create -f qcow2 /var/lib/libvirt/images/base.s2 10G -b /var/lib/libvirt/images/base.s1 -o backing_fmt=qcow2
Formatting '/var/lib/libvirt/images/base.s1', fmt=qcow2 size=8589934592 backing_file='/var/lib/libvirt/images/vm1.qcow2' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off 
Formatting '/var/lib/libvirt/images/base.s2', fmt=qcow2 size=10737418240 backing_file='/var/lib/libvirt/images/base.s1' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off 

# qemu-img info /var/lib/libvirt/images/base.s2 --backing-chain
image: /var/lib/libvirt/images/base.s2
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 196K
cluster_size: 65536
backing file: /var/lib/libvirt/images/base.s1
backing file format: qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false

image: /var/lib/libvirt/images/base.s1
file format: qcow2
virtual size: 8.0G (8589934592 bytes)
disk size: 196K
cluster_size: 65536
backing file: /var/lib/libvirt/images/vm1.qcow2
backing file format: qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false

image: /var/lib/libvirt/images/vm1.qcow2
file format: qcow2
virtual size: 8.0G (8589934592 bytes)
disk size: 8.0G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: true

2. start vm with /var/lib/libvirt/images/base.s2
# virsh start vm1
Domain vm1 started

# virsh domblklist vm1
Target     Source
------------------------------------------------
hda        /var/lib/libvirt/images/base.s2

3. attempt to blockpull
# virsh blockpull vm1 hda 
error: unsupported configuration: block jobs not supported with this QEMU binary


# virsh blockpull vm1 hda --base /var/lib/libvirt/images/base.s1
error: unsupported configuration: block jobs not supported with this QEMU binary
Comment 10 errata-xmlrpc 2015-03-05 02:44:22 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0323.html

Note You need to log in before you can comment on or make changes to this bug.