Bug 1535992 - Set force shared option "-U" as default option for "qemu-img info"
Summary: Set force shared option "-U" as default option for "qemu-img info"
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.5
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Fam Zheng
QA Contact: Ping Li
Depends On:
TreeView+ depends on / blocked
Reported: 2018-01-18 12:13 UTC by yanqzhan@redhat.com
Modified: 2018-05-18 02:14 UTC (History)
20 users (show)

Fixed In Version: qemu-kvm-rhev-2.10.0-18.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-04-11 00:58:52 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1104 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2018-04-10 22:54:38 UTC

Description yanqzhan@redhat.com 2018-01-18 12:13:19 UTC
Description of problem:
Products like RHV using "qemu-img info" to get image info of a running guest will get qemu lock error(Bug 1378241). 
If only add '-U' option in RHV product,e.g.RHV 4.2[1], the old version RHV 4.1 that must run with 7.5 will also encounter the issue.
So expect that setting force shared option "-U" as default option for "qemu-img info".

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

How reproducible:

Steps to Reproduce:
1.Start a guest and check its image info by qemu-img info AND with -U
a. # qemu-img info /rhev/data-center/mnt/
qemu-img: Could not open '/rhev/data-center/mnt/': Failed to get shared "write" lock
Is another process using the image?

b. # qemu-img info -U /rhev/data-center/mnt/
image: /rhev/data-center/mnt/
file format: qcow2
virtual size: 7.0G (7516192768 bytes)
disk size: 1.3G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

2. On RHV do live storage migration, check the vdsm.log:
# cat vdsm.log|grep ERROR
2018-01-18 04:30:37,367-0500 ERROR (jsonrpc/0) [storage.TaskManager.Task] (Task='13bc9f6e-446f-46a1-a8da-0d4d015f4d45') Unexpected error (task:875)
2018-01-18 04:30:37,368-0500 ERROR (jsonrpc/0) [storage.Dispatcher] FINISH getQemuImageInfo error=Command ['/usr/bin/qemu-img', 'info', '--output', 'json', '-f', 'qcow2', u'/rhev/data-center/mnt/'] failed with rc=1 out='' err='qemu-img: Could not open \'/rhev/data-center/mnt/\': Failed to get shared "write" lock\nIs another process using the image?\n' (dispatcher:86)

Actual results:
As in steps.

Expected results:
Set force shared option "-U" as default option for "qemu-img info"

Additional info:

Comment 7 Miroslav Rezanina 2018-01-23 13:01:20 UTC
Fix included in qemu-kvm-rhev-2.10.0-18.el7

Comment 11 errata-xmlrpc 2018-04-11 00:58:52 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.


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