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 1177062 - The error messages are not accurate enough when do blockcommit passing target[index] to base and top
Summary: The error messages are not accurate enough when do blockcommit passing target...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-24 02:20 UTC by Yang Yang
Modified: 2015-11-19 06:05 UTC (History)
7 users (show)

Fixed In Version: libvirt-1.2.15-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 06:05:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Yang Yang 2014-12-24 02:20:41 UTC
Description of problem:
As described in comment #4 in bug 1110212, file a low priority bug.
https://bugzilla.redhat.com/show_bug.cgi?id=1110212#c4

Version-Release number of selected component (if applicable):
libvirt-1.2.8-10.el7.x86_64
qemu-kvm-rhev-2.1.2-16.el7.x86_64
kernel-3.10.0-212.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1. create 4 external disk-only snapshots
# for i in {1..4}; do virsh snapshot-create-as vm2 s$i --disk-only --diskspec hda,file=/tmp/vm2.s$i; done
Domain snapshot s1 created
Domain snapshot s2 created
Domain snapshot s3 created
Domain snapshot s4 created

# virsh domblklist vm2
Target     Source
------------------------------------------------
hda        /tmp/vm2.s4

2.blockcommit passing hda[x] to base and top
# virsh blockcommit vm2 hda --base hda[2] --top hda[2] --wait --verbose
error: invalid argument: could not find backing store 2 in chain for '/tmp/vm2.s4'

# virsh blockcommit vm2 hda --base hda[1] --top hda[2] --wait --verbose
error: invalid argument: could not find backing store 1 in chain for '/tmp/vm2.s4'


# virsh blockcommit vm2 hda --base hda[1] --top /tmp/vm2.s1 --wait --verbose
error: invalid argument: could not find backing store 1 in chain for '/tmp/vm2.s4'


Actual results:


Expected results:
Libvirt should provide a proper error info 

Additional info:

Comment 1 Peter Krempa 2015-04-22 12:31:48 UTC
Following upstream commit improves the error message:

commit dff92b3f2fe63da63391f929134b06d3be992a40
Author: Peter Krempa <pkrempa>
Date:   Tue Apr 21 17:38:08 2015 +0200

    util: storage: Improve error message when requesting image above 'start'
    
    When a user would specify a backing chain index that is above the start
    point libvirt would report a rather unhelpful error:
    
    invalid argument: could not find backing store 1 in chain for 'sub/link2'
    
    This patch adds an explicit check that the index is below start point in
    the backing store and reports the following error if not:
    
    invalid argument: requested backing store index 1 is above 'sub/../qcow2' in chain for 'sub/link2'

v1.2.14-260-gdff92b3

Comment 3 Yang Yang 2015-05-25 10:15:44 UTC
Hi Peter
I found a tiny issue that error message is not accurate when passing an invalid path to base when using gluster as storage backend

# virsh blockcommit vm3 vda --top vda[2] --base xx --wait --verbose 
error: invalid argument: top '/rhel7.qcow2' in chain for 'vda' has no backing file

# virsh blockcommit vm3 vda --top vda[2] --base vda[] --wait --verbose --bandwidth 1
error: invalid argument: top '/rhel7.qcow2' in chain for 'vda' has no backing file

==============================================
The following test scenarios have passed.
Tested with libvirt-1.2.15-2.el7.x86_64

Steps

<disk type='network' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source protocol='gluster' name='gluster-vol1/rhel7.s3'>
        <host name='10.66.4.164' port='24007'/>
      </source>
      <backingStore type='network' index='1'>
        <format type='qcow2'/>
        <source protocol='gluster' name='gluster-vol1/rhel7.s2'>
          <host name='10.66.4.164'/>
        </source>
        <backingStore type='network' index='2'>
          <format type='qcow2'/>
          <source protocol='gluster' name='gluster-vol1/rhel7.s1'>
            <host name='10.66.4.164'/>
          </source>
          <backingStore type='network' index='3'>
            <format type='qcow2'/>
            <source protocol='gluster' name='gluster-vol1/rhel7.qcow2'>
              <host name='10.66.4.164'/>
            </source>
            <backingStore/>
          </backingStore>
        </backingStore>
      </backingStore>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </disk>


# virsh blockcommit vm3 vda --top vda[2] --base vda[1] --wait --verbose
error: invalid argument: requested backing store index 1 is above '/rhel7.s1' in chain for '/rhel7.s3'

# virsh blockcommit vm3 vda --top vda[2] --base vda[2] --wait --verbose
error: invalid argument: requested backing store index 2 is above '/rhel7.s1' in chain for '/rhel7.s3'

# virsh blockcommit vm3 vda --top xx --base vda[1] --wait --verbose --bandwidth 1
error: invalid argument: could not find image 'xx' in chain for '/rhel7.s3'

Comment 4 Peter Krempa 2015-06-03 08:07:15 UTC
Yes that's a known issue. Network disk strings in error messages need to be fixed at some time. Here as long as it works for local files it's good enough.

Comment 5 Yang Yang 2015-06-03 08:42:07 UTC
Thanks Peter.

Also verified it with local file

libvirt-1.2.15-2.el7.x86_64

Steps as following

# virsh blockcommit simple vda --top vda[2] --base xx --wait --verbose
error: invalid argument: could not find image 'xx' beneath '/tmp/simple.s2' in chain for '/tmp/simple.s4'

# virsh blockcommit simple vda --top vda[2] --base vda[] --wait --verbose
error: invalid argument: could not find image 'vda[]' beneath '/tmp/simple.s2' in chain for '/tmp/simple.s4'

# virsh blockcommit simple vda --top vda[] --base vda[] --wait --verbose
error: invalid argument: could not find image 'vda[]' in chain for '/tmp/simple.s4'


# virsh blockcommit simple vda --top vda[2] --base vda[1] --wait --verbose
error: invalid argument: requested backing store index 1 is above '/tmp/simple.s2' in chain for '/tmp/simple.s4'

# virsh blockcommit simple vda --top vda[2] --base vda[2] --wait --verbose
error: invalid argument: requested backing store index 2 is above '/tmp/simple.s2' in chain for '/tmp/simple.s4'

Per comment #2 and comment #4, move it to verified status.

Comment 7 errata-xmlrpc 2015-11-19 06:05:44 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://rhn.redhat.com/errata/RHBA-2015-2202.html


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