Bug 1390991 - Wrong error message when executing qemu-img commit with wrong arguments while confusing base and top volumes
Summary: Wrong error message when executing qemu-img commit with wrong arguments while...
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Max Reitz
QA Contact: Ping Li
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-02 11:26 UTC by Ala Hino
Modified: 2017-08-02 03:32 UTC (History)
15 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2017-08-01 23:37:14 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2392 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2017-08-01 20:04:36 UTC

Description Ala Hino 2016-11-02 11:26:20 UTC
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.

Comment 1 Nir Soffer 2016-11-03 18:12:39 UTC
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).

Comment 2 Max Reitz 2016-11-04 17:26:03 UTC
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

Comment 3 Max Reitz 2017-05-10 13:14:48 UTC
Fixed in upstream commit 6b33f3ae8b79726ef0812597b8a83c3e82d31514.

Comment 5 Ping Li 2017-05-24 05:08:54 UTC
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'

Comment 7 errata-xmlrpc 2017-08-01 23:37:14 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-2017:2392

Comment 8 errata-xmlrpc 2017-08-02 01:14:54 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-2017:2392

Comment 9 errata-xmlrpc 2017-08-02 02:06: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.

https://access.redhat.com/errata/RHSA-2017:2392

Comment 10 errata-xmlrpc 2017-08-02 02:47:39 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-2017:2392

Comment 11 errata-xmlrpc 2017-08-02 03:12: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://access.redhat.com/errata/RHSA-2017:2392

Comment 12 errata-xmlrpc 2017-08-02 03:32:30 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-2017:2392


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