]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Clear async job when p2p migration fails early
authorJiri Denemark <jdenemar@redhat.com>
Wed, 17 Oct 2012 12:08:17 +0000 (14:08 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 17 Oct 2012 14:59:37 +0000 (16:59 +0200)
When p2p migration fails early because qemuMigrationIsAllowed or
qemuMigrationIsSafe say migration should be cancelled, we fail to clear
the migration-out async job. As a result of that, further APIs called
for the same domain may fail with Timed out during operation: cannot
acquire state change lock.

Reported by Guido Winkelmann.

src/qemu/qemu_migration.c

index 10c32c582da5f81f5e53ca2a7284b220342fa98f..ea2edcdc70213791f417bbd9fa148d252598770e 100644 (file)
@@ -2624,10 +2624,10 @@ qemuMigrationPerformJob(struct qemud_driver *driver,
     }
 
     if (!qemuMigrationIsAllowed(driver, vm, NULL))
-        goto cleanup;
+        goto endjob;
 
     if (!(flags & VIR_MIGRATE_UNSAFE) && !qemuMigrationIsSafe(vm->def))
-        goto cleanup;
+        goto endjob;
 
     resume = virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING;