render / rpms / libvirt

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