Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
If using relative path (e.g. ./dest) or file name only (e.g. dest)
as the destination of drive-mirror, libvirt creates file under / dir
After pivoting, we cannot take snapshot and specify snapshot file in other
directories.
Version-Release number of selected component (if applicable):
libvirt-1.3.1-1.fc24_v1.3.1_rc2.x86_64
How reproducible:
100%
Steps to Reproduce:
1. mirror and pivot to ./generic.copy
# virsh blockcopy generic hda ./generic.copy --wait --verbose
Block Copy: [100 %]
Now in mirroring phase
[root@fedora_yy tmp]# virsh blockjob generic hda
Block Copy: [100 %]
[root@fedora_yy tmp]# virsh blockjob generic hda --pivot
[root@fedora_yy tmp]# virsh domblklist generic
Target Source
------------------------------------------------
hda ./generic.copy
2. check where is generic.copy
# ll /generic.copy
-rw-------. 1 qemu qemu 1848901632 Jan 19 17:25 /generic.copy
3. take external snapshot and specify snapshot file
# virsh snapshot-create-as generic --disk-only --no-metadata --diskspec hda,file=/tmp/copy.s1
error: internal error: unable to execute QEMU command 'transaction': Could not open '/tmp/./generic.copy': No such file or directory
Actual results:
Expected results:
Forbid using relative path or file name only as the destination of drive-mirror
Additional info:
(In reply to Cole Robinson from comment #1)
> I sent a patch upstream, converting a relative path to absolute in the virsh
> handling
>
> http://www.redhat.com/archives/libvir-list/2016-April/msg01342.html
That handling is incorrect. This needs to be fixed in the daemon. I'm picking this up since I'll probably fix it anyways while fixing other aspects of blockcopy.
Fixed upstream:
commit 9e9305542eee6700358c6f3c449347cc191eb520
Author: Peter Krempa <pkrempa>
Date: Fri Dec 16 18:30:39 2016 +0100
qemu: block copy: Forbid block copy to relative paths
Similarly to 29bb066915 forbid paths used with blockjobs to be relative.
1. Start a transient VM:
# virsh list --all --transient
Id Name State
----------------------------------------------------
3 RHEL running
2. Try to blockcopy with relative path:
# virsh blockcopy RHEL sda xx --wait --verbose --pivot
error: invalid argument: absolute path must be used as block copy target
# virsh blockcopy RHEL sda ../xx --wait --verbose --pivot
error: invalid argument: absolute path must be used as block copy target
# virsh blockcopy RHEL sda ./xx --wait --verbose --pivot
error: invalid argument: absolute path must be used as block copy target
Bug fixed.
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/RHEA-2017:1846
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/RHEA-2017:1846