Bug 1791522
| Summary: | Failed to start a domain with corrupted managed save file | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Yanqiu Zhang <yanqzhan> |
| Component: | libvirt | Assignee: | Pavel Mores <pmores> |
| Status: | CLOSED ERRATA | QA Contact: | Yanqiu Zhang <yanqzhan> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.2 | CC: | berrange, chhu, dyuan, eskultet, jdenemar, jil, jsuchane, lmen, pkrempa, smitterl, xuzhang, yanqzhan, ymankad |
| Target Milestone: | rc | Keywords: | Automation, Regression, Triaged |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-6.3.0-1.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-11-17 17:46:36 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
Yanqiu Zhang
2020-01-16 02:54:49 UTC
And what do you expect to happen? The managed save image (if present) restored by using virsh start [1], so if the image is corrupted it's expected that the VM will fail to start. If it fails libvirt then removes the failed image and the VM will be started fresh. This always worked this way thus my question. We could argue that the error message could be potentially improved though. [1] https://libvirt.org/manpages/virsh.html#managedsave https://libvirt.org/manpages/virsh.html#start Hi Peter, Previously libvirt removes the corrupt image and makes a fresh start on the first try. You can also refer to bz1460962 and bz730750. Thanks. > And what do you expect to happen?
>
> The managed save image (if present) restored by using virsh start [1], so if
> the image is corrupted it's expected that the VM will fail to start. If it
> fails libvirt then removes the failed image and the VM will be started fresh.
This implicit start after detecting an error should have not been IMO implemented in the first place especially when there's an API to remove the managedsave file. I agree the error should be improved though.
(In reply to Erik Skultety from comment #4) > > And what do you expect to happen? > > > > The managed save image (if present) restored by using virsh start [1], so if > > the image is corrupted it's expected that the VM will fail to start. If it > > fails libvirt then removes the failed image and the VM will be started fresh. > > This implicit start after detecting an error should have not been IMO > implemented in the first place especially when there's an API to remove the > managedsave file. I agree the error should be improved though. In hindsight, it looks like questionable behaviour, but none the less this is what we explicitly did in the past, so we should be fixing the API regression here. Fixed by d9792233ec qemuDomainSaveImageOpen: Refactor handling of errors 9219424f56 qemuDomainSaveImageOpen: Use 'g_new0' instead of VIR_ALLOC(_N) db907a4d9c qemuDomainSaveImageOpen: Automatically close 'fd' if unneeded 3850add603 qemuDomainSaveImageOpen: Use g_autoptr for 'def' 92b9657986 virQEMUSaveData: Register autoclear function and use it in qemuDomainSaveImageOpen f76a571820 qemu: fix domain start with corrupted save file v6.2.0-224-gf76a571820 Verify this bug on: libvirt-daemon-6.3.0-1.module+el8.3.0+6478+69f490bb.x86_64 qemu-kvm-4.2.0-19.module+el8.3.0+6478+69f490bb.x86_64 Steps and results are same as bz1460962#c13. And log msg: 2020-05-09 08:11:35.505+0000: 332050: warning : qemuDomainObjStart:7526 : Ignoring incomplete managed state /var/lib/libvirt/qemu/save/avocado-vt-vm1.save 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 (virt:8.3 bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2020:5137 |