Red Hat Bugzilla – Bug 1390991
Wrong error message when executing qemu-img commit with wrong arguments while confusing base and top volumes
Last modified: 2017-08-01 23:32:30 EDT
Description of problem: When executing qemu-img commit while confusing base volume with top volume, wrong error is returned. Version-Release number of selected component (if applicable): $ rpm -qa | grep qemu qemu-img-ev-2.3.0-31.el7.16.1.x86_64 qemu-kvm-ev-2.3.0-31.el7.16.1.x86_64 qemu-kvm-tools-ev-2.3.0-31.el7.16.1.x86_64 libvirt-daemon-driver-qemu-1.2.17-13.el7_2.5.x86_64 ipxe-roms-qemu-20130517-7.gitc4bce43.el7.noarch qemu-kvm-common-ev-2.3.0-31.el7.16.1.x86_64 ipxe-roms-qemu-20130517-8.gitc4bce43.el7_2.1.noarch How reproducible: 100% Steps to Reproduce: 1. create two volumes 2. run qemu-img commit and replace top with base 3. Actual results: Following error that is presented indicates that base not found while it does exists: QImgError: cmd=['/usr/bin/taskset', '--cpu-list', '0-3', '/usr/bin/nice', '-n', '19', '/usr/bin/ionice', '-c', '3', '/usr/bin/qemu-img', 'commit', '-p', '-t', 'none', '-b', '/rhev/data-center/mnt/blockSD/5604e048-bb26-4ae0-b21c-8cd4b4516a28/images/7b25d429-93fb-46de-b1bc-7aaf7ee77e33/873a90e2-cc23-4b32-918c-b7d1374c8605', '-f', 'raw', '/rhev/data-center/mnt/blockSD/5604e048-bb26-4ae0-b21c-8cd4b4516a28/images/7b25d429-93fb-46de-b1bc-7aaf7ee77e33/481f0c94-3d68-4080-a810-b0e1bd3a29a8'], ecode=1, stdout=, stderr=qemu-img: Base '/rhev/data-center/mnt/blockSD/5604e048-bb26-4ae0-b21c-8cd4b4516a28/images/7b25d429-93fb-46de-b1bc-7aaf7ee77e33/873a90e2-cc23-4b32-918c-b7d1374c8605' not found , message=None Expected results: I'd expect an error explaining that base volume is not part of the chain.
Trying to clean up the mess from vdsm - the command run was: qemu-img commit -b 873a90e2-cc23-4b32-918c-b7d1374c8605 -f raw 481f0c94-3d68-4080-a810-b0e1bd3a29a8 Both file exists - the real chain is (top -> base): 873a90e2-cc23-4b32-918c-b7d1374c8605 -> 481f0c94-3d68-4080-a810-b0e1bd3a29a8 And the error was: qemu-img: Base 873a90e2-cc23-4b32-918c-b7d1374c8605 not found I think the error should be that the base image (873a90e2-cc23-4b32-918c-b7d1374c8605) is not in the backing chain of top image (481f0c94-3d68-4080-a810-b0e1bd3a29a8).
Hi, The error message is not wrong, but it is indeed unclear: What it means by “base not found” is “the given base was not found in the backing chain”. I will see to rewrite it to make it more clear. Max
Fixed in upstream commit 6b33f3ae8b79726ef0812597b8a83c3e82d31514.
Reproduced the issue with below packages: kernel-3.10.0-514.21.1.el7.x86_64 qemu-kvm-rhev-2.6.0-28.el7_3.9 Test steps: # qemu-img create -f raw base.img 1G Formatting 'base.img', fmt=raw size=1073741824 # qemu-img create -f qcow2 sn.qcow2 1G Formatting 'sn.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 # qemu-img commit -p -t none -b base.img -f raw sn.qcow2 (0.00/100%) qemu-img: Base 'base.img' not found Verified the issue with below packages: kernel-3.10.0-671.el7.x86_64 qemu-kvm-rhev-2.9.0-6.el7 Test steps: # qemu-img create -f raw base.img 1G Formatting 'base.img', fmt=raw size=1073741824 # qemu-img create -f qcow2 sn.qcow2 1G Formatting 'sn.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 # qemu-img commit -p -t none -b base.img -f raw sn.qcow2 (0.00/100%) qemu-img: Did not find 'base.img' in the backing chain of 'sn.qcow2'
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-2017:2392