Bug 744724 - virsh snapshot-edit allow to change snapshot name and create a new fake snapshot with the new name
Summary: virsh snapshot-edit allow to change snapshot name and create a new fake snaps...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 747120
TreeView+ depends on / blocked
 
Reported: 2011-10-10 10:21 UTC by yuping zhang
Modified: 2011-12-06 11:37 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.9.4-17.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:37:18 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description yuping zhang 2011-10-10 10:21:14 UTC
Description of problem:
Use virsh snapshot-edit to edit an exist snapshot,update the snapshot name then save,it will create a new fake snapshot with new name.

Version-Release number of selected component (if applicable):
libvirt-client-0.9.4-16.el6.x86_64
libvirt-0.9.4-16.el6.x86_64
libvirt-python-0.9.4-16.el6.x86_64


How reproducible:
always

Steps to Reproduce:
1.# virsh snapshot-create rhel6
Domain snapshot 1318280132 created

2.# virsh snapshot-list rhel6
 Name                 Creation Time             State
------------------------------------------------------------
 1318280132           2011-10-11 04:55:32 +0800 shutoff

3.# virsh snapshot-edit rhel6 1318280132
  *Change 
  <domainsnapshot>
    <name>1318280132</name>
   ...
to
  <domainsnapshot>
    <name>1318280130</name>
  ...
then save*
 Snapshot 1318280132 edited.

4.# virsh snapshot-list rhel6
 Name                 Creation Time             State
------------------------------------------------------------
 1318280130           2011-10-11 04:55:32 +0800 shutoff
 1318280132           2011-10-11 04:55:32 +0800 shutoff

5.# virsh snapshot-revert rhel6 1318280130
error: internal error Child process (/usr/bin/qemu-img snapshot -a 1318280130 /var/lib/libvirt/images/Winxp-32bit-qcow2-kvm) status unexpected: exit status 1

6.# qemu-img info /var/lib/libvirt/images/rhel6-qcow2
image: /var/lib/libvirt/images/rhel6-qcow2
file format: qcow2
virtual size: 6.0G (6442450944 bytes)
disk size: 1.4G
cluster_size: 65536
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         1318280132                0 2011-10-11 04:55:32   00:00:00.000

Actual results:
As above.

Expected results:
Virsh snapshot-edit should not allow to change the snapshot name.

Additional info:

Comment 2 Eric Blake 2011-10-10 15:20:43 UTC
Funny that you should find this independently from me proposing the upstream patch just last weekend:

https://www.redhat.com/archives/libvir-list/2011-October/msg00263.html

Comment 6 Huang Wenlong 2011-10-12 05:17:44 UTC
Verify this bug with libvirt-0.9.4-17.el6.x86_64


[root@intel-w3520-12-2 images]# virsh snapshot-create q2
Domain snapshot 1318396559 created
[root@intel-w3520-12-2 images]# virsh snapshot-edit 1318396559
error: command 'snapshot-edit' requires <snapshotname> option
[root@intel-w3520-12-2 images]# virsh snapshot-edit q2 1318396559 
error: Must use --rename or --clone to change 1318396559 to 1318396560

Comment 7 errata-xmlrpc 2011-12-06 11:37:18 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.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


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