On 05/27/2014 05:24 PM, Eric Blake wrote: > On 05/27/2014 08:06 AM, Jason J. Herne wrote: >> From: "Jason J. Herne" <jjherne@xxxxxxxxxx> >> >> qemuDomainObjStart is checking the return code from qemuDomainObjRestore for >> errors even after determining that the return code is 0. This causes the >> following error message to appear even when the restore was successful. >> > >> + if (ret > 0) { >> + VIR_WARN("Ignoring incomplete managed state %s", managed_save); >> + } else { >> + VIR_WARN("Unable to restore from managed state %s. " >> + "Maybe the file is corrupted?", managed_save); >> + } >> } >> + goto cleanup; > > This goto is placed wrong; it causes us to skip starting the domain even > when loading managed state was successful. Actually, it looks like we WANT to goto cleanup for ret == 0, and that the real problem is that commit cfc28c66 botched up for being noisy on success. Maybe the fix we want is: diff --git i/src/qemu/qemu_driver.c w/src/qemu/qemu_driver.c index f008763..86190ff 100644 --- i/src/qemu/qemu_driver.c +++ w/src/qemu/qemu_driver.c @@ -6085,8 +6085,9 @@ qemuDomainObjStart(virConnectPtr conn, if (ret > 0) { VIR_WARN("Ignoring incomplete managed state %s", managed_save); } else { - VIR_WARN("Unable to restore from managed state %s. " - "Maybe the file is corrupted?", managed_save); + if (ret < 0) + VIR_WARN("Unable to restore from managed state %s. " + "Maybe the file is corrupted?", managed_save); goto cleanup; } } -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list