]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Properly reset TLS in qemuProcessRecoverMigrationIn
authorJiri Denemark <jdenemar@redhat.com>
Tue, 4 Apr 2017 17:43:13 +0000 (19:43 +0200)
committerCole Robinson <crobinso@redhat.com>
Wed, 10 May 2017 19:18:38 +0000 (15:18 -0400)
There is no async job running when a freshly started libvirtd is trying
to recover from an interrupted incoming migration. While at it, let's
call qemuMigrationResetTLS every time we don't kill the domain. This is
not strictly necessary since TLS is not supported when v2 migration
protocol is used, but doing so makes more sense.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit 59b28ecab845adb6fefe3280675f95d1f2135e3b)

src/qemu/qemu_process.c

index 039b3911c8eef48d6352f022cae8c8e044367926..0b9b4f76af8f25f2d6b788a24e7068c0620c8c8b 100644 (file)
@@ -2973,9 +2973,6 @@ qemuProcessRecoverMigrationIn(virQEMUDriverPtr driver,
         /* migration finished, we started resuming the domain but didn't
          * confirm success or failure yet; killing it seems safest unless
          * we already started guest CPUs or we were in post-copy mode */
-        ignore_value(qemuMigrationResetTLS(driver, vm,
-                                           QEMU_ASYNC_JOB_MIGRATION_IN,
-                                           NULL, NULL));
         if (postcopy) {
             qemuMigrationPostcopyFailed(driver, vm);
         } else if (state != VIR_DOMAIN_RUNNING) {
@@ -2985,6 +2982,7 @@ qemuProcessRecoverMigrationIn(virQEMUDriverPtr driver,
         break;
     }
 
+    qemuMigrationResetTLS(driver, vm, QEMU_ASYNC_JOB_NONE, NULL, NULL);
     return 0;
 }