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 1152482 - HMP and QMP prints wrong after live merge to the relative path of the backing file
Summary: HMP and QMP prints wrong after live merge to the relative path of the backing...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jeff Cody
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-14 09:07 UTC by Qian Guo
Modified: 2016-03-28 06:26 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-27 20:00:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Qian Guo 2014-10-14 09:07:57 UTC
Description of problem:
During verifying bug 1061827, after live merging via qmp with option "backing-file", found hmp and qmp does not print right, it still prints the absolute path instead of relative

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.1.2-3.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create snapshots with Base->sn1->sn2->sn3:
qemu-img create -f qcow2 -b /home/nfs/rhel7u1cp1.qcow2 /home/sn1
qemu-img create -f qcow2 -b /home/sn1 /home/sn2
qemu-img create -f qcow2 -b /home/sn2 /home/sn3

2.Boot guest with /home/sn3:
/usr/libexec/qemu-kvm -device virtio-scsi-pci,bus=pci.0,addr=0x4,id=scsi0 -drive file=/home/sn3,if=none,id=drive-scsi0-0-0,media=disk,cache=none,format=qcow2,werror=stop,rerror=stop,aio=native -device scsi-hd,drive=drive-scsi0-0-0,bus=scsi0.0,scsi-id=0,lun=0,id=t -qmp unix:/tmp/q1,server,nowait -monitor stdio -nodefaults -nodefconfig

3.Check path before do live merge:
# qemu-img info sn3
image: sn3
file format: qcow2
virtual size: 50G (53687091200 bytes)
disk size: 196K
cluster_size: 65536
backing file: /home/sn2
Format specific information:
    compat: 1.1
    lazy refcounts: false

{ "execute": "query-block" }
{"return": [{"io-status": "ok", "device": "drive-scsi0-0-0", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "image": {"backing-image": {"backing-image": {"backing-image": {"virtual-size": 53687091200, "filename": "/home/nfs/rhel7u1cp1.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 7207256064, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "backing-filename-format": "qcow2", "virtual-size": 53687091200, "filename": "/home/sn1", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "backing-filename": "/home/nfs/rhel7u1cp1.qcow2", "dirty-flag": false}, "backing-filename-format": "qcow2", "virtual-size": 53687091200, "filename": "/home/sn2", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "backing-filename": "/home/sn1", "dirty-flag": false}, "backing-filename-format": "qcow2", "virtual-size": 53687091200, "filename": "/home/sn3", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "backing-filename": "/home/sn2", "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 3, "drv": "qcow2", "iops": 0, "bps_wr": 0, "backing_file": "/home/sn2", "encrypted": false, "bps": 0, "bps_rd": 0, "file": "/home/sn3", "encryption_key_missing": false}, "type": "unknown"}]}

(qemu) info block
drive-scsi0-0-0: /home/sn3 (qcow2)
    Backing file:     /home/sn2 (chain depth: 3)
 
4.Do block-stream with absolute path of backing file:
{ "execute": "block-stream", "arguments": { "device": "drive-scsi0-0-0", "base": "/home/nfs/rhel7u1cp1.qcow2", "speed": 1000000000,  "backing-file": "/home/nfs/rhel7u1cp1.qcow2"} }

5.Then check as step3:
# qemu-img info sn3
image: sn3
file format: qcow2
virtual size: 50G (53687091200 bytes)
disk size: 196K
cluster_size: 65536
backing file: /home/nfs/rhel7u1cp1.qcow2   ------ absolute path
backing file format: qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false

(qemu) info block
drive-scsi0-0-0: /home/sn3 (qcow2)
    Backing file:     /home/nfs/rhel7u1cp1.qcow2 (chain depth: 1)  --- absolute 

{ "execute": "query-block" }
{"return": [{"io-status": "ok", "device": "drive-scsi0-0-0", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "image": {"backing-image": {"virtual-size": 53687091200, "filename": "/home/nfs/rhel7u1cp1.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 7207256064, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "backing-filename-format": "qcow2", "virtual-size": 53687091200, "filename": "/home/sn3", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "backing-filename": "/home/nfs/rhel7u1cp1.qcow2", "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 1, "drv": "qcow2", "iops": 0, "bps_wr": 0, "backing_file": "/home/nfs/rhel7u1cp1.qcow2", "encrypted": false, "bps": 0, "bps_rd": 0, "file": "/home/sn3", "encryption_key_missing": false}, "type": "unknown"}]}



6. Do block-stream with relative path of backing file
{ "execute": "block-stream", "arguments": { "device": "drive-scsi0-0-0", "base": "/home/nfs/rhel7u1cp1.qcow2", "speed": 1000000000,  "backing-file": "./nfs/rhel7u1cp1.qcow2"} }

7.Then check as step3:
# qemu-img info sn3
image: sn3
file format: qcow2
virtual size: 50G (53687091200 bytes)
disk size: 196K
cluster_size: 65536
backing file: ./nfs/rhel7u1cp1.qcow2     -- relative 
backing file format: qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false


(qemu) info block
drive-scsi0-0-0: /home/sn3 (qcow2)
    Backing file:     /home/nfs/rhel7u1cp1.qcow2 (chain depth: 1)  -- absolute

{ "execute": "query-block" }
{"return": [{"io-status": "ok", "device": "drive-scsi0-0-0", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "image": {"backing-image": {"virtual-size": 53687091200, "filename": "/home/nfs/rhel7u1cp1.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 7207256064, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "backing-filename-format": "qcow2", "virtual-size": 53687091200, "filename": "/home/sn3", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "backing-filename": "/home/nfs/rhel7u1cp1.qcow2", "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 1, "drv": "qcow2", "iops": 0, "bps_wr": 0, "backing_file": "/home/nfs/rhel7u1cp1.qcow2", "encrypted": false, "bps": 0, "bps_rd": 0, "file": "/home/sn3", "encryption_key_missing": false}, "type": "unknown"}]}


8.Do block-commit with absolute path of backing file
{ "execute": "block-commit", "arguments": { "device": "drive-scsi0-0-0", "base": "/home/nfs/rhel7u1cp1.qcow2", "top": "/home/sn2", "speed": 1000000000, "backing-file": "/home/nfs/rhel7u1cp1.qcow2"} }

9.Then check as step3:

# qemu-img info sn3
image: sn3
file format: qcow2
virtual size: 50G (53687091200 bytes)
disk size: 196K
cluster_size: 65536
backing file: /home/nfs/rhel7u1cp1.qcow2  -- absolute
backing file format: qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false

(qemu) info block
drive-scsi0-0-0: /home/sn3 (qcow2)
    Backing file:     /home/nfs/rhel7u1cp1.qcow2 (chain depth: 1) -- absolute

{ "execute": "query-block" }
{"return": [{"io-status": "ok", "device": "drive-scsi0-0-0", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "image": {"backing-image": {"virtual-size": 53687091200, "filename": "/home/nfs/rhel7u1cp1.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 7207256064, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "backing-filename-format": "qcow2", "virtual-size": 53687091200, "filename": "/home/sn3", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "backing-filename": "/home/nfs/rhel7u1cp1.qcow2", "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 1, "drv": "qcow2", "iops": 0, "bps_wr": 0, "backing_file": "/home/nfs/rhel7u1cp1.qcow2", "encrypted": false, "bps": 0, "bps_rd": 0, "file": "/home/sn3", "encryption_key_missing": false}, "type": "unknown"}]}


10.Do block-commit with relative path of backing file

{ "execute": "block-commit", "arguments": { "device": "drive-scsi0-0-0", "base": "/home/nfs/rhel7u1cp1.qcow2", "top": "/home/sn2", "speed": 1000000000, "backing-file": "./nfs/rhel7u1cp1.qcow2"} }

11.Then check as step3:

# qemu-img info sn3
image: sn3
file format: qcow2
virtual size: 50G (53687091200 bytes)
disk size: 196K
cluster_size: 65536
backing file: ./nfs/rhel7u1cp1.qcow2     --- relative 
backing file format: qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false

(qemu) info block
drive-scsi0-0-0: /home/sn3 (qcow2)
    Backing file:     /home/nfs/rhel7u1cp1.qcow2 (chain depth: 1)   -- absolute 

{ "execute": "query-block" }
{"return": [{"io-status": "ok", "device": "drive-scsi0-0-0", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "image": {"backing-image": {"virtual-size": 53687091200, "filename": "/home/nfs/rhel7u1cp1.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 7207256064, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "backing-filename-format": "qcow2", "virtual-size": 53687091200, "filename": "/home/sn3", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "backing-filename": "/home/nfs/rhel7u1cp1.qcow2", "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 1, "drv": "qcow2", "iops": 0, "bps_wr": 0, "backing_file": "/home/nfs/rhel7u1cp1.qcow2", "encrypted": false, "bps": 0, "bps_rd": 0, "file": "/home/sn3", "encryption_key_missing": false}, "type": "unknown"}


Actual results:
HMP and QMP prints absolute path and qemu-img info prints relative path of backing file after do live merge with relative path


Expected results:
HMP and QMP should prints relative path.

Additional info:

Comment 2 Jeff Cody 2014-11-25 19:06:28 UTC
Moving this to 7.2, as libvirt has the means now to specify a custom path for relative filename merges


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