Re: [PATCH 2/2] snapshot: enforce REVERT_FORCE on qemu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/04/2011 04:02 PM, Eric Blake wrote:
* src/qemu/qemu_driver.c (qemuDomainRevertToSnapshot): Check for
risky situations, and allow force to get past them.

ACK.

Before pushing this, I'm running some sanity tests. So far, this test
sequence (adjusted to the fixed code) shows where force helps with older
snapshots (I'll send separate email for showing how force helps active
ABI-incompatible snapshots):

Test 3:
$ virsh define dom # domain with qcow2 disk
$ virsh snapshot-create-as dom snap
$ virsh edit dom # and add a second disk
$ virsh start dom
$ virsh snapshot-revert dom snap
# revert succeeds and domain is offline
$ virsh dumpxml dom # dom is back to one disk
$ virsh snapshot-revert dom snap --running
# revert succeeds, and dom boots
$ virsh shutdown dom # and wait for it to work
$ virsh edit dom # and add a second disk
$ virsh start dom
$ virt-manager # and open a window on the guest
$ virsh snapshot-revert dom snap --running
error: revert requires force: must respawn qemu to start inactive snapshot
# Error was expected
$ virsh snapshot-revert dom snap --running --force
# revert succeeds, and virt-manager display bounces
$ virsh dumpxml dom # dom is back to one disk

And now that I've covered all three cases where I used the new VIR_ERR_SNAPSHOT_REVERT_RISKY error code in qemu_driver.c, I'm comfortable enough with my testing to go ahead and push all three ACK'd patches.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]