Bug 692998
Summary: | data loss if restoring libvirt domain encounters transient error | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Eric Blake <eblake> |
Component: | libvirt | Assignee: | Osier Yang <jyang> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.1 | CC: | dallan, eblake, mzhan, syeghiay, yoyzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-0.8.7-17.el6 | Doc Type: | Bug Fix |
Doc Text: |
libvirt removed the managed state file (created by "virsh managedsave dom") even if it failed to restore and start the domain using that file. This caused data loss. The managed state file is now removed only if the restore operation succeeds.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2011-05-19 13:29:36 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: |
Description
Eric Blake
2011-04-01 22:30:29 UTC
The problem exists only for "virsh managedsave dom; virsh start dom", "virsh save dom dom.save; virsh restore dom.save" works fine, as it doesn't trys to unlink the saved state. patch posted to upstream: http://www.redhat.com/archives/libvir-list/2011-April/msg00215.html Verified this bug pass with libvirt-0.8.7-17.el6.x86_64 1. # virsh start rhel61 Do some operation in guest, for example open a document 2. # virsh managedsave rhel61 # ll /var/lib/libvirt/qemu/save/rhel61.save -rw-------. 1 root root 497719393 Apr 18 05:58 /var/lib/libvirt/qemu/save/rhel61.save 3. # rpm -e qemu-kvm --nodeps 4. # # virsh start rhel61 error: Failed to start domain rhel61 error: Cannot find QEMU binary /usr/libexec/qemu-kvm: No such file or directory # ll /var/lib/libvirt/qemu/save/rhel61.save -rw-------. 1 root root 497719393 Apr 18 05:58 /var/lib/libvirt/qemu/save/rhel61.save 5. # rpm -ivh qemu-kvm-0.12.1.2-2.158.el6.x86_64.rpm # service libvirtd restart 6. # virsh start rhel61 The guest is restored from the save file, and the document is still open in the guest Reproduced this bug with libvirt-0.8.7-16.el6.x86_64 In step 4, the save file is deleted In step 6, the guest is boot up freshly Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: libvirt removes the managed state file (created by "virsh managedsave dom") even if it fails to start up the domain from restoring with the managed state file, which causes data loss, with this update, it removes the managed state file only if restoring from the managed state file succeeded. Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -libvirt removes the managed state file (created by "virsh managedsave dom") even if it fails to start up the domain from restoring with the managed state file, which causes data loss, with this update, it removes the managed state file only if restoring from the managed state file succeeded.+libvirt removed the managed state file (created by "virsh managedsave dom") even if it failed to restore and start the domain using that file. This caused data loss. The managed state file is now removed only if the restore operation succeeds. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0596.html |