[libvirt] [PATCH] qemu: Reset hasManagedSave after removing a corrupted image

Jiri Denemark posted 1 patch 6 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/7ac25a37bbd7349215f0596f7329edc9fa7c5051.1508834393.git.jdenemar@redhat.com
src/qemu/qemu_driver.c | 1 +
1 file changed, 1 insertion(+)
[libvirt] [PATCH] qemu: Reset hasManagedSave after removing a corrupted image
Posted by Jiri Denemark 6 years, 5 months ago
When starting a domain with managed save image, we try to restore it
first. If the image is corrupted, we silently unlink it and just
normally start the domain. At this point the domain has no managed save
image, yet we did not reset the hasManagedSave flag.

https://bugzilla.redhat.com/show_bug.cgi?id=1460962

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_driver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 32a416f9e..74fdfdb0f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7256,6 +7256,7 @@ qemuDomainObjStart(virConnectPtr conn,
             } else {
                 VIR_WARN("Ignoring incomplete managed state %s", managed_save);
                 priv->job.current->operation = op;
+                vm->hasManagedSave = false;
             }
         }
     }
-- 
2.14.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Reset hasManagedSave after removing a corrupted image
Posted by Peter Krempa 6 years, 5 months ago
On Tue, Oct 24, 2017 at 10:39:53 +0200, Jiri Denemark wrote:
> When starting a domain with managed save image, we try to restore it
> first. If the image is corrupted, we silently unlink it and just
> normally start the domain. At this point the domain has no managed save
> image, yet we did not reset the hasManagedSave flag.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1460962
> 
> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> ---
>  src/qemu/qemu_driver.c | 1 +
>  1 file changed, 1 insertion(+)

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