[libvirt] [PATCH] qemu: fix regression that hangs on save failure

Eric Blake eblake at redhat.com
Mon Mar 28 23:04:43 UTC 2011


Regression introduced in commit 6034ddd55.

* src/qemu/qemu_driver.c (qemudDomainSaveFlag): Jump to correct
label.
---

Aargh - I introduced a regression that hangs libvirtd due to an
inadvertent change in label names (copied and pasted from
doCoreDump, where the correct label was indeed named cleanup).

> -    if (rc < 0)
> -        goto endjob;
> -
> +    /* Perform the migration */
> +    if (qemuMigrationToFile(driver, vm, qemuCaps, fd, offset, path,
> +                            qemuCompressProgramName(compressed),
> +                            is_reg, bypassSecurityDriver) < 0)
> +        goto cleanup;

By jumping to the wrong label, a failed save attempt never released
the job condition, locking out all future operations on that domain.

Pushing this under the trivial rule.

 src/qemu/qemu_driver.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 182b0fd..e97c1d9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1990,10 +1990,10 @@ static int qemudDomainSaveFlag(struct qemud_driver *driver, virDomainPtr dom,
     if (qemuMigrationToFile(driver, vm, qemuCaps, fd, offset, path,
                             qemuCompressProgramName(compressed),
                             is_reg, bypassSecurityDriver) < 0)
-        goto cleanup;
+        goto endjob;
     if (VIR_CLOSE(fd) < 0) {
         virReportSystemError(errno, _("unable to close %s"), path);
-        goto cleanup;
+        goto endjob;
     }

     ret = 0;
-- 
1.7.4




More information about the libvir-list mailing list