RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1233115 - Blockcopy always fail when use options "granularity"
Summary: Blockcopy always fail when use options "granularity"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1233826 1238585
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-18 09:11 UTC by Shanzhi Yu
Modified: 2016-11-03 18:19 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1233826 (view as bug list)
Environment:
Last Closed: 2016-11-03 18:19:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Shanzhi Yu 2015-06-18 09:11:15 UTC
Description of problem:

Blockcopy always fail when use options "granularity"

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

libvirt-1.2.16-1.el7.x86_64
qemu-kvm-rhev-2.3.0-2.el7.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Prepare a transient guest

# virsh list --transient && virsh domblklist r7
Id Name State
----------------------------------------------------
8 r7 running

Target Source
------------------------------------------------
vda /var/lib/libvirt/images/r7.img


2. Do blockcopy with option "--granularity"

# virsh blockcopy r7 vda /var/lib/libvirt/images/r7.s1 --granularity 4096 --verbose --wait
Block Copy: [ 0 %]
Now in mirroring phase


3. Check blockjob info and guest live xml
# virsh blockjob r7 vda
No current block job for vda

# virsh dumpxml r7|grep mirror

# ll -h /var/lib/libvirt/images/r7.s1
-rw-------. 1 qemu qemu 384K Jun 18 14:55 /var/lib/libvirt/images/r7.s1

4. Do blockcopy without option "--granularity"

# virsh blockcopy r7 vda /var/lib/libvirt/images/r7.s1 --verbose --wait
Block Copy: [100 %]
Now in mirroring phase

# virsh blockjob r7 vda
Block Copy: [100 %]



Actual results:


Expected results:

blockcopy should work well

Additional info:

Comment 1 Peter Krempa 2015-06-23 12:12:45 UTC
Invalid output in step 2 is fixed by:

commit e7d3ff8464ed4833fa9c9bd9ef1f613f04434b31
Author: Peter Krempa <pkrempa>
Date:   Fri Jun 19 15:43:02 2015 +0200

    virsh: blockcopy: Report error if the copy job fails
    
    When the block job would fail while watching it using the "--wait"
    option for blockcopy, virsh would rather unhelpfully report:
    
    $ virsh blockcopy vm hdc /tmp/raw.img --granularity 4096 --verbose --wait
    
    Now in mirroring phase
    
    Add a special case when the block job vanishes while waiting for it to
    finish to improve the message:
    
    $ virsh blockcopy vm hdc /tmp/raw.img --granularity 8192 --verbose --wait
    error: Block Copy unexpectedly failed

Comment 5 Yang Yang 2016-08-09 08:31:36 UTC
Verified with qemu-kvm-rhev-2.6.0-19.el7.x86_64 and libvirt-2.0.0-4.el7.x86_64, as driver-mirror with flag granularity works well under qemu, it passed under libvirt as well.

# virsh blockcopy vm1-q35-pxb vda /tmp/copy --granularity 4096 --wait --verbose
Block Copy: [100 %]
Now in mirroring phase


To trigger a failure by qemu, I tested with qemu-kvm-rhev-2.6.0-12.el7.x86_64 and libvirt-2.0.0-4.el7.x86_64

# virsh blockcopy vm1 vda /tmp/copy --granularity 4096 --wait --verbose
Block Copy: [  0 %]
Copy failed

Libvirt reports error when copy job fails.

Comment 7 errata-xmlrpc 2016-11-03 18:19:06 UTC
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-2016-2577.html


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