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 1142703 - Improve the error report when there is already a blockpull job
Summary: Improve the error report when there is already a blockpull job
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-17 08:54 UTC by Shanzhi Yu
Modified: 2015-11-19 05:47 UTC (History)
4 users (show)

Fixed In Version: libvirt-1.2.14-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:47:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Shanzhi Yu 2014-09-17 08:54:46 UTC
Description of problem:

Improve the error report when there is already a blockpull job

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

libvirt-1.2.8-2.el7.x86_64

How reproducible:

100%

Steps to Reproduce:

1. Prepare a running guest
#virsh list
# virsh list
 Id    Name                           State
----------------------------------------------------
 12    rhel6.5                        running

2. Create external disk snapshot
# virsh snapshot-create-as rhel6.5 s1 --disk-only  
Domain snapshot s1 created

3. Do blockpull
# virsh blockpull rhel6.5 vda --verbose --wait --bandwidth 1
Block Pull: [ 0 % ]

4. Do blockcommit/blockcopy before blockpull is done

# /usr/bin/virsh blockcommit rhel6.5  vda --active
error: internal error: unable to execute QEMU command 'block-commit': Device 'drive-virtio-disk0' is busy: block device is in use by block job: stream

# /usr/bin/virsh blockcopy rhel6.5 vda /mnt/sss
error: internal error: unable to execute QEMU command 'drive-mirror': Device 'drive-virtio-disk0' is busy: block device is in use by block job: stream

# /usr/bin/virsh blockpull rhel6.5 vda
error: internal error: Unexpected error: (GenericError) 'Device 'drive-virtio-disk0' is busy: block device is in use by block job: stream'


Actual results:


Expected results:

Libvirt should give more accurate error report like
"error: block pull still active: disk 'vda' already in active block job"

Additional info:

Comment 2 Pavel Hrdina 2015-06-18 12:19:33 UTC
Upstream commin:

commit 51f9f03a4ca50b070c0fbfb29748d49f583e15e1
Author: Peter Krempa <pkrempa>
Date:   Fri Mar 13 17:22:04 2015 +0100

    qemu: Disallow concurrent block jobs on a single disk
    
    While qemu may be prepared to do this libvirt is not. Forbid the block
    ops until we fix our code.


v1.2.13-177-g51f9f03

Comment 4 Yang Yang 2015-07-22 09:58:35 UTC
Verified with libvirt-1.2.17-2.el7.x86_64 and qemu-kvm-rhev-2.3.0-12.el7.x86_64

Steps
1. do concurrent block ops when blockpull is running
in terminal 1
# virsh blockpull vm1 vda --wait --verbose --bandwidth 1
Block Pull: [  2 %]

in terminal 2
# virsh blockpull vm1 vda --wait --verbose --bandwidth 1
error: Operation not supported: disk 'vda' already in active block job

# virsh blockcommit vm1 vda --verbose --bandwidth 1 --active --wait
error: Operation not supported: disk 'vda' already in active block job

# virsh blockcopy vm1 vda /tmp/copy
error: Operation not supported: disk 'vda' already in active block job


2. do concurrent block ops when blockcommit is running
in terminal 1
# virsh blockcommit vm1 vda --wait --verbose --bandwidth 1 --active
Block Commit: [  6 %]

in terminal 2
# virsh blockcommit vm1 vda --verbose --bandwidth 1 --active --wait
error: block copy still active: disk 'vda' already in active block job

# virsh blockpull vm1 vda --wait --verbose --bandwidth 1
error: block copy still active: disk 'vda' already in active block job

# virsh blockcopy vm1 vda /tmp/copy
error: block copy still active: disk 'vda' already in active block job

3. do concurrent block ops when blockcopy is running
in terminal 1
# virsh blockcopy vm1 vda /tmp/copy --wait --verbose --bandwidth 1

Now in mirroring phase

The issue is tracked by Bug 1210903

in terminal 2
# virsh blockcopy vm1 vda /tmp/copy
error: block copy still active: disk 'vda' already in active block job

# virsh blockpull vm1 vda --wait --verbose --bandwidth 1
error: block copy still active: disk 'vda' already in active block job

# virsh blockcommit vm1 vda --verbose --bandwidth 1 --active --wait
error: block copy still active: disk 'vda' already in active block job

Comment 6 errata-xmlrpc 2015-11-19 05:47:20 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/RHBA-2015-2202.html


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