Bug 1179532

Summary: Fail to do snapshot-revert and domain will be paused
Product: Red Hat Enterprise Linux 6 Reporter: Shanzhi Yu <shyu>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.6CC: dyuan, eblake, jsuchane, mzhan, rbalakri, yanyang, zhwang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-20 08:55:40 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 Shanzhi Yu 2015-01-07 03:12:58 UTC
Description of problem:

Fail to do snapshot-revert and domain will be paused

Version-Release number of selected component (if applicable):

libvirt-0.10.2-47.el6.x86_64

How reproducible:

100%

Steps to Reproduce:

1. Prepare a running domain
# virsh list
Id Name State
----------------------------------------------------
23 rh6 running


2. Create two snapshots

# virsh snapshot-create-as rh6 s1
Domain snapshot s1 created
# virsh snapshot-create-as rh6 s2 --memspec file=/var/lib/libvirt/images/rh6.mem.s2
Domain snapshot s2 created

# virsh snapshot-list rh6
Name Creation Time State
------------------------------------------------------------
s1 2015-01-06 13:12:37 +0800 running
s2 2015-01-06 13:13:33 +0800 running

3. Try to do snapshot-revert

# virsh snapshot-revert rh6 s1
error: Requested operation is not valid: the snapshot 's1' does not exist, and was not loaded

# virsh snapshot-revert rh6 s2
error: Requested operation is not valid: the snapshot 's2' does not exist, and was not loaded

4. Check domain status
# virsh list
Id Name State
----------------------------------------------------
23 rh6 paused

# virsh snapshot-list rh6
Name Creation Time State
------------------------------------------------------------
s1 2015-01-06 13:12:37 +0800 running
s2 2015-01-06 13:13:33 +0800 running



Actual results:


Expected results:


Additional info:

Comment 1 Jaroslav Suchanek 2015-01-20 08:55:40 UTC

*** This bug has been marked as a duplicate of bug 1124854 ***

Comment 2 Shanzhi Yu 2015-01-29 10:38:30 UTC
(In reply to Jaroslav Suchanek from comment #1)
> 
> *** This bug has been marked as a duplicate of bug 1124854 ***

This bug is not same as bug 1124854, that bug has been fixed in libvirt-0.10.2-48.el6.x86_64, while I still can reproduce this bug

# rpm -q libvirt
libvirt-0.10.2-48.el6.x86_64

1. Prepare running guest
# virsh list 
 Id    Name                           State
----------------------------------------------------
 10    rhel6.5                        running

2. Create one internal snapshot, one external snapshot

# virsh snapshot-create-as rhel6.5 sp1 
Domain snapshot sp1 created
# virsh list 
 Id    Name                           State
----------------------------------------------------
 10    rhel6.5                        running

# virsh snapshot-create-as rhel6.5 sp2 --memspec file=/tmp/sp2.mem 
Domain snapshot sp2 created

3. Revert to internal snapshot sp1
# virsh snapshot-revert rhel6.5 sp1 
error: Requested operation is not valid: the snapshot 'sp1' does not exist, and was not loaded

4. Check guest status

# virsh list 
 Id    Name                           State
----------------------------------------------------
 10    rhel6.5                        paused

So, should reopen this bug?