render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
a41c76
From fcad662da8e472fc749a439d5bc2bdd30164d779 Mon Sep 17 00:00:00 2001
a41c76
Message-Id: <fcad662da8e472fc749a439d5bc2bdd30164d779@dist-git>
a41c76
From: Jiri Denemark <jdenemar@redhat.com>
a41c76
Date: Thu, 16 Jan 2020 19:57:53 +0100
a41c76
Subject: [PATCH] qemu: Don't emit SUSPENDED_POSTCOPY event on destination
a41c76
MIME-Version: 1.0
a41c76
Content-Type: text/plain; charset=UTF-8
a41c76
Content-Transfer-Encoding: 8bit
a41c76
a41c76
When pause-before-switchover QEMU capability is enabled, we get STOP
a41c76
event before MIGRATION event with postcopy-active state. To properly
a41c76
handle post-copy migration and emit correct events commit
a41c76
v4.10.0-rc1-4-geca9d21e6c added a hack to
a41c76
qemuProcessHandleMigrationStatus which translates the paused state
a41c76
reason to VIR_DOMAIN_PAUSED_POSTCOPY and emits
a41c76
VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY event when migration state changes
a41c76
to post-copy.
a41c76
a41c76
However, the code was effective on both sides of migration resulting in
a41c76
a confusing VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY event on the destination
a41c76
host, where entering post-copy mode is already properly advertised by
a41c76
VIR_DOMAIN_EVENT_RESUMED_POSTCOPY event.
a41c76
a41c76
https://bugzilla.redhat.com/show_bug.cgi?id=1791458
a41c76
a41c76
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
a41c76
Reviewed-by: Ján Tomko <jtomko@redhat.com>
a41c76
(cherry picked from commit bd04d63ad97c21b6955710e6473a502f49816a3c)
a41c76
a41c76
https://bugzilla.redhat.com/show_bug.cgi?id=1791886
a41c76
a41c76
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
a41c76
Message-Id: <9b32d5af0dd1d3bf7108abc426dc4d6ceeaa84f8.1579193220.git.jdenemar@redhat.com>
a41c76
Reviewed-by: Ján Tomko <jtomko@redhat.com>
a41c76
---
a41c76
 src/qemu/qemu_process.c | 1 +
a41c76
 1 file changed, 1 insertion(+)
a41c76
a41c76
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
a41c76
index 4195042194..a7bbab9e56 100644
a41c76
--- a/src/qemu/qemu_process.c
a41c76
+++ b/src/qemu/qemu_process.c
a41c76
@@ -1653,6 +1653,7 @@ qemuProcessHandleMigrationStatus(qemuMonitorPtr mon G_GNUC_UNUSED,
a41c76
     virDomainObjBroadcast(vm);
a41c76
 
a41c76
     if (status == QEMU_MONITOR_MIGRATION_STATUS_POSTCOPY &&
a41c76
+        priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_OUT &&
a41c76
         virDomainObjGetState(vm, &reason) == VIR_DOMAIN_PAUSED &&
a41c76
         reason == VIR_DOMAIN_PAUSED_MIGRATION) {
a41c76
         VIR_DEBUG("Correcting paused state reason for domain %s to %s",
a41c76
-- 
a41c76
2.25.0
a41c76