Bug 1569835
Summary: | qemu-img get wrong backing file path after rebasing image with relative path | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Tingting Mao <timao> |
Component: | qemu-kvm-rhev | Assignee: | Hanna Czenczek <hreitz> |
Status: | CLOSED ERRATA | QA Contact: | Tingting Mao <timao> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 7.5 | CC: | chayang, juzhang, knoel, michen, ngu, pingl, timao, virt-maint |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-rhev-2.12.0-6.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-11-01 11:07:33 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tingting Mao
2018-04-20 04:59:49 UTC
Hi, First, # qemu-img create -f qcow2 -F raw -b sn1.qcow2 snapshot/sn2.qcow2 That should be -F qcow2. Disregarding that, I can reproduce the bug. I don’t think it’s a recent regression, I think we’ve had this issue for a long time now. Max Sent an upstream series: http://lists.nongnu.org/archive/html/qemu-block/2018-05/msg00243.html (In reply to Max Reitz from comment #2) > Hi, > > First, > > # qemu-img create -f qcow2 -F raw -b sn1.qcow2 snapshot/sn2.qcow2 > > That should be -F qcow2. I am sorry for the mistake, and thanks for your remind. > Disregarding that, I can reproduce the bug. I don’t think it’s a recent > regression, I think we’ve had this issue for a long time now. Yes, I agree that we've had this issue for a long time now. Fix included in qemu-kvm-rhev-2.12.0-6.el7 Verified this issue like below Tested packages qemu-kvm-rhev-2.12.0-7.el7 kenerl-3.10.0-918.el7 Steps 1.Create base.qcow2 in director "/home/test/bug_relative-path/snapshot" # qemu-img create -f qcow2 base.qcow2 10G Formatting 'base.qcow2', fmt=qcow2 size=10737418240 cluster_size=65536 lazy_refcounts=off refcount_bits=16 2.Create sn1.qcow2 in director "/home/test/bug_relative-path/" # qemu-img create -f qcow2 -F qcow2 -b base.qcow2 snapshot/sn1.qcow2 Formatting 'snapshot/sn1.qcow2', fmt=qcow2 size=10737418240 backing_file=base.qcow2 backing_fmt=qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16 3.Create sn2.qcow2 in the same director "/home/test/bug_relative-path/" # qemu-img create -f qcow2 -F qcow2 -b sn1.qcow2 snapshot/sn2.qcow2 Formatting 'snapshot/sn2.qcow2', fmt=qcow2 size=10737418240 backing_file=sn1.qcow2 backing_fmt=qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16 4.Execute rebase #pwd /home/test/bug_relative-path 4.1 Rebase with relative path for backing file also, it should be failed. # qemu-img rebase -p -b snapshot/base.qcow2 -f qcow2 -F qcow2 snapshot/sn2.qcow2 qemu-img: Could not open new backing file 'snapshot/base.qcow2': Could not open 'snapshot/snapshot/base.qcow2': No such file or directory 4.2 Rebase with relative path just for snapshot, it should success # qemu-img rebase -b base.qcow2 -f qcow2 -F qcow2 snapshot/sn2.qcow2---> success # qemu-img info snapshot/sn2.qcow2 --backing-chain image: snapshot/sn2.qcow2 file format: qcow2 virtual size: 10G (10737418240 bytes) disk size: 196K cluster_size: 65536 backing file: base.qcow2 (actual path: snapshot/base.qcow2) backing file format: qcow2 Format specific information: compat: 1.1 lazy refcounts: false refcount bits: 16 corrupt: false image: snapshot/base.qcow2 file format: qcow2 virtual size: 10G (10737418240 bytes) disk size: 196K cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false refcount bits: 16 corrupt: false 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/RHBA-2018:3443 |