Red Hat Bugzilla – Bug 1535992
Set force shared option "-U" as default option for "qemu-img info"
Last modified: 2018-05-17 22:14:26 EDT
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): qemu-kvm-rhev-2.10.0-17.el7.x86_64 libvirt-3.9.0-7.el7.x86_64 vdsm-4.20.13-1.el7ev.x86_64 ovirt-engine-4.2.1.1-0.1.el7.noarch How reproducible: 100% 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/10.73.194.27:_vol_S3_libvirtmanual_yanqzhan_rhv__nfs__1/ed9643e6-0dae-4511-a8ff-42749439b177/images/0ae9ac30-818d-4440-aa3d-758083d8b9b2/04115713-aa45-40e9-b960-a63a33167ae1 qemu-img: Could not open '/rhev/data-center/mnt/10.73.194.27:_vol_S3_libvirtmanual_yanqzhan_rhv__nfs__1/ed9643e6-0dae-4511-a8ff-42749439b177/images/0ae9ac30-818d-4440-aa3d-758083d8b9b2/04115713-aa45-40e9-b960-a63a33167ae1': Failed to get shared "write" lock Is another process using the image? b. # qemu-img info -U /rhev/data-center/mnt/10.73.194.27:_vol_S3_libvirtmanual_yanqzhan_rhv__nfs__1/ed9643e6-0dae-4511-a8ff-42749439b177/images/0ae9ac30-818d-4440-aa3d-758083d8b9b2/04115713-aa45-40e9-b960-a63a33167ae1 image: /rhev/data-center/mnt/10.73.194.27:_vol_S3_libvirtmanual_yanqzhan_rhv__nfs__1/ed9643e6-0dae-4511-a8ff-42749439b177/images/0ae9ac30-818d-4440-aa3d-758083d8b9b2/04115713-aa45-40e9-b960-a63a33167ae1 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/10.73.194.27:_vol_S3_libvirtmanual_yanqzhan_rhv__nfs__1/ed9643e6-0dae-4511-a8ff-42749439b177/images/0ae9ac30-818d-4440-aa3d-758083d8b9b2/04115713-aa45-40e9-b960-a63a33167ae1'] failed with rc=1 out='' err='qemu-img: Could not open \'/rhev/data-center/mnt/10.73.194.27:vol_S3_libvirtmanual_yanqzhan_rhvnfs_1/ed9643e6-0dae-4511-a8ff-42749439b177/images/0ae9ac30-818d-4440-aa3d-758083d8b9b2/04115713-aa45-40e9-b960-a63a33167ae1\': 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:
Fix included in qemu-kvm-rhev-2.10.0-18.el7
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