render / rpms / libvirt

Forked from rpms/libvirt a year ago
Clone
6d3351
From 93313904b77e40a1ebb7b0cf6fdcadf34d6cb175 Mon Sep 17 00:00:00 2001
6d3351
Message-Id: <93313904b77e40a1ebb7b0cf6fdcadf34d6cb175@dist-git>
6d3351
From: Jiri Denemark <jdenemar@redhat.com>
6d3351
Date: Tue, 4 Apr 2017 19:43:13 +0200
6d3351
Subject: [PATCH] qemu: Properly reset TLS in qemuProcessRecoverMigrationIn
6d3351
6d3351
There is no async job running when a freshly started libvirtd is trying
6d3351
to recover from an interrupted incoming migration. While at it, let's
6d3351
call qemuMigrationResetTLS every time we don't kill the domain. This is
6d3351
not strictly necessary since TLS is not supported when v2 migration
6d3351
protocol is used, but doing so makes more sense.
6d3351
6d3351
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6d3351
(cherry picked from commit 59b28ecab845adb6fefe3280675f95d1f2135e3b)
6d3351
6d3351
https://bugzilla.redhat.com/show_bug.cgi?id=1425003
6d3351
6d3351
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6d3351
---
6d3351
 src/qemu/qemu_process.c | 4 +---
6d3351
 1 file changed, 1 insertion(+), 3 deletions(-)
6d3351
6d3351
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
6d3351
index 039b3911c..0b9b4f76a 100644
6d3351
--- a/src/qemu/qemu_process.c
6d3351
+++ b/src/qemu/qemu_process.c
6d3351
@@ -2973,9 +2973,6 @@ qemuProcessRecoverMigrationIn(virQEMUDriverPtr driver,
6d3351
         /* migration finished, we started resuming the domain but didn't
6d3351
          * confirm success or failure yet; killing it seems safest unless
6d3351
          * we already started guest CPUs or we were in post-copy mode */
6d3351
-        ignore_value(qemuMigrationResetTLS(driver, vm,
6d3351
-                                           QEMU_ASYNC_JOB_MIGRATION_IN,
6d3351
-                                           NULL, NULL));
6d3351
         if (postcopy) {
6d3351
             qemuMigrationPostcopyFailed(driver, vm);
6d3351
         } else if (state != VIR_DOMAIN_RUNNING) {
6d3351
@@ -2985,6 +2982,7 @@ qemuProcessRecoverMigrationIn(virQEMUDriverPtr driver,
6d3351
         break;
6d3351
     }
6d3351
 
6d3351
+    qemuMigrationResetTLS(driver, vm, QEMU_ASYNC_JOB_NONE, NULL, NULL);
6d3351
     return 0;
6d3351
 }
6d3351
 
6d3351
-- 
6d3351
2.12.2
6d3351