]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Unlock monitor when connecting to dest qemu fails
authorJiri Denemark <jdenemar@redhat.com>
Wed, 15 Feb 2012 15:48:54 +0000 (16:48 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 16 Feb 2012 09:58:35 +0000 (10:58 +0100)
When migrating a qemu domain, we enter the monitor, send some commands,
try to connect to destination qemu, send other commands, end exit the
monitor. However, if we couldn't connect to destination qemu we forgot
to exit the monitor.

Bug introduced by commit d9d518b1c8ef3b65658cc91f85ba33a63c0959a4.

src/qemu/qemu_migration.c

index a513b3c078de4416de0df594c4009b6f432cd7d4..f0af49417aef24181b00a6a59c6d7ee55ec3eb02 100644 (file)
@@ -1624,8 +1624,10 @@ qemuMigrationRun(struct qemud_driver *driver,
 
     /* connect to the destination qemu if needed */
     if (spec->destType == MIGRATION_DEST_CONNECT_HOST &&
-        qemuMigrationConnect(driver, vm, spec) < 0)
+        qemuMigrationConnect(driver, vm, spec) < 0) {
+        qemuDomainObjExitMonitorWithDriver(driver, vm);
         goto cleanup;
+    }
 
     switch (spec->destType) {
     case MIGRATION_DEST_HOST: