Bug 1150379

Summary: attempts to live snapshot merge (commit) of the active layer hang
Product: Red Hat Enterprise Linux 7 Reporter: Jan Kurik <jkurik>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: alitke, areis, bmcclain, bsarathy, dyuan, eblake, famz, iheim, jdenemar, juzhang, kchamart, knoel, mjenner, mzhan, pkrempa, pm-eus, rbalakri, scohen, sdenham, sgordon, sherold, shu, shyu, tdosek, virt-bugs, virt-maint, xuzhang, yanyang
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.1.1-29.el7_0.4 Doc Type: Bug Fix
Doc Text:
Cause: In RHEL 6, libvirt had been relying on qemu to supply the error message when active commit was attempted. But when qemu added support for active commit in RHEL 7, the addition requires additional interaction that libvirt was not supplying. Consequence: Attempts to perform an unsupported active commit would cause libvirt to hang. Fix: Libvirt was fixed to detect active commit itself, and declare the feature unsupported until a future libvirt release adds the additional interaction that qemu requires. Result: Libvirt no longer hangs when attempting to do something that is not supported until RHEL 7.1.
Story Points: ---
Clone Of: 1148201 Environment:
Last Closed: 2015-01-05 20:30:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1062142, 1148201    
Bug Blocks: 784395    

Description Jan Kurik 2014-10-08 06:26:53 UTC
This bug has been copied from bug #1148201 and has been proposed
to be backported to 7.0 z-stream (EUS).

Comment 6 Yang Yang 2014-12-16 05:58:44 UTC
Reproduced it with libvirt-1.1.1-29.el7_0.3.x86_64 and 
qemu-kvm-rhev-1.5.3-60.el7_0.11.x86_64

Steps to reproduce:
1. create 3 external snapshots
# for i in {1..3}; do virsh snapshot-create-as vm1 s$i --disk-only --diskspec hda,file=/tmp/vm1.s$i; done
Domain snapshot s1 created
Domain snapshot s2 created
Domain snapshot s3 created

# virsh snapshot-list vm1
 Name                 Creation Time             State
------------------------------------------------------------
 s1                   2014-12-16 13:21:39 +0800 disk-snapshot
 s2                   2014-12-16 13:21:39 +0800 disk-snapshot
 s3                   2014-12-16 13:21:39 +0800 disk-snapshot

2. active commit
# virsh blockcommit vm1 hda --wait --verbose
Block Commit: [100 %]
Libvirt hang and never return


Verified it with libvirt-1.1.1-29.el7_0.4.x86_64 and 
qemu-kvm-rhev-1.5.3-60.el7_0.11.x86_64

Steps to verify it
1. create 3 external snapshots
# for i in {1..3}; do virsh snapshot-create-as vm1 s$i --disk-only --diskspec hda,file=/tmp/vm1.s$i; done
Domain snapshot s1 created
Domain snapshot s2 created
Domain snapshot s3 created

# virsh snapshot-list vm1
 Name                 Creation Time             State
------------------------------------------------------------
 s1                   2014-12-16 13:15:15 +0800 disk-snapshot
 s2                   2014-12-16 13:15:15 +0800 disk-snapshot
 s3                   2014-12-16 13:15:15 +0800 disk-snapshot

2. active commit
# virsh blockcommit vm1 hda
error: Operation not supported: committing the active layer not supported yet

# virsh blockcommit vm1 hda --base /tmp/vm1.s2 
error: Operation not supported: committing the active layer not supported yet

# virsh blockcommit vm1 hda --base /tmp/vm1.s1 --top /tmp/vm1.s3
error: Operation not supported: committing the active layer not supported yet

# virsh blockcommit vm1 hda  --top /tmp/vm1.s3
error: Operation not supported: committing the active layer not supported yet

# virsh blockcommit vm1 hda --wait --verbose
error: Operation not supported: committing the active layer not supported yet

As active commit returns with error instead of hang, I'd like to set it as verified.

Comment 8 errata-xmlrpc 2015-01-05 20:30:04 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.

https://rhn.redhat.com/errata/RHSA-2015-0008.html