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 1515604 - qemu-img info: failed to get "consistent read" lock on a mirroring image
Summary: qemu-img info: failed to get "consistent read" lock on a mirroring image
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Qianqian Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-21 05:52 UTC by Han Han
Modified: 2018-04-11 00:51 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-rhev-2.10.0-17.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-11 00:49:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1104 0 None None None 2018-04-11 00:51:20 UTC

Description Han Han 2017-11-21 05:52:00 UTC
Description of problem:
As subject

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.10.0-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
Create this bug to track an upstream issue discussion:
http://lists.nongnu.org/archive/html/qemu-discuss/2017-11/msg00045.html

# /usr/libexec/qemu-kvm -name A -machine pc,accel=kvm \
-vnc 0.0.0.0:1 \
-monitor stdio \
-qmp tcp:0:5555,server,nowait \
-serial unix:/tmp/monitor,server,nowait \
-drive file=/var/lib/libvirt/images/V.qcow2,format=qcow2,if=none,id=drive-virtio-blk0,werror=stop,rerror=stop \
-device virtio-blk-pci,drive=drive-virtio-blk0,id=virtio-blk0

QEMU 2.10.0 monitor - type 'help' for more information
(qemu) drive_mirror drive-virtio-blk0 /var/lib/libvirt/images/V.new
Formatting '/var/lib/libvirt/images/V.new', fmt=qcow2 size=10737418240 cluster_size=65536 lazy_refcounts=off refcount_bits=16

# qemu-img info /var/lib/libvirt/images/V.new -U
qemu-img: Could not open '/var/lib/libvirt/images/V.new': Failed to get "consistent read" lock
Is another process using the image?

Actual results:
As above

Expected results:
Could query image info on mirroring image by -U option.

Additional info:

Comment 2 Kevin Wolf 2017-11-21 11:25:36 UTC
Fix is on the mailing list:

[PATCH for-2.11 0/2] Fix 'qemu-img info' on mirror target
https://lists.gnu.org/archive/html/qemu-block/2017-11/msg00796.html

Comment 3 Kevin Wolf 2017-11-30 16:54:03 UTC
Turns out this fixed only raw images, but not image formats. Sent a follow-up:

[PATCH] block: Formats don't need CONSISTENT_READ with NO_IO
http://lists.gnu.org/archive/html/qemu-block/2017-11/msg01191.html

Comment 5 Miroslav Rezanina 2018-01-16 13:44:24 UTC
Fix included in qemu-kvm-rhev-2.10.0-17.el7

Comment 7 Qianqian Zhu 2018-01-17 02:39:50 UTC
Reproduced on qemu-kvm-rhev-10:2.10.0-14.el7.x86_64:

Steps:
1. Launch guest:
/usr/libexec/qemu-kvm \
-name A \
-machine pc,accel=kvm \
-monitor stdio \
-drive file=/home/kvm_autotest_root/images/rhel74-64-virtio.qcow2,format=qcow2,if=none,id=drive-virtio-blk0,werror=stop,rerror=stop  \
-device virtio-blk-pci,drive=drive-virtio-blk0,id=virtio-blk0

2. Block mirror:
(qemu) drive_mirror drive-virtio-blk0 mirror

3. # qemu-img info -U mirror

Results:
Can't get image information.
# qemu-img info -U mirror
qemu-img: Could not open 'mirror': Failed to get "consistent read" lock
Is another process using the image?

Verified on qemu-kvm-rhev-2.10.0-17.el7.x86_64:
Steps same as above. 
Results:
Get image information correctly.
# qemu-img info -U mirror
image: mirror
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 1.9G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

Moving to VERIFIED.

Comment 10 errata-xmlrpc 2018-04-11 00:49:36 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://access.redhat.com/errata/RHSA-2018:1104


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