render / rpms / libvirt

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