Blame SOURCES/0084-Call-migrate_end_complete-after-falling-back-to-swit.patch

e2c81d
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
e2c81d
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
e2c81d
Date: Wed, 20 Jul 2016 17:16:31 +0400
e2c81d
Subject: [PATCH] Call migrate_end_complete() after falling back to switch-host
e2c81d
MIME-Version: 1.0
e2c81d
Content-Type: text/plain; charset=UTF-8
e2c81d
Content-Transfer-Encoding: 8bit
e2c81d
e2c81d
Eventually, during a seamless migration, qemu may finish to migrate
e2c81d
before the spice client even finished to connect all channels to
e2c81d
destination and informed the server. In this case,
e2c81d
main_channel_client_migrate_src_complete() will fall back to
e2c81d
switch-host method, and reds_mig_fill_wait_disconnect() is called to
e2c81d
complete the migration (disconnecting all channels).
e2c81d
e2c81d
reds_mig_cleanup() is called when all channels are disconnected, but
e2c81d
reds->mig_wait_connect is still TRUE, and it will call
e2c81d
migrate_connect_complete() instead of the expected
e2c81d
migrate_end_complete(). Setting reds->mig_wait_connect to FALSE when
e2c81d
reds_mig_fill_wait_disconnect() solves the issue.
e2c81d
e2c81d
Fixes:
e2c81d
https://bugzilla.redhat.com/show_bug.cgi?id=1352836
e2c81d
e2c81d
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
e2c81d
---
e2c81d
 server/reds.c | 1 +
e2c81d
 1 file changed, 1 insertion(+)
e2c81d
e2c81d
diff --git a/server/reds.c b/server/reds.c
e2c81d
index e7e4090..9e1d5e7 100644
e2c81d
--- a/server/reds.c
e2c81d
+++ b/server/reds.c
e2c81d
@@ -3500,6 +3500,7 @@ static void reds_mig_fill_wait_disconnect(void)
e2c81d
         wait_client->client = client;
e2c81d
         ring_add(&reds->mig_wait_disconnect_clients, &wait_client->link);
e2c81d
     }
e2c81d
+    reds->mig_wait_connect = FALSE;
e2c81d
     reds->mig_wait_disconnect = TRUE;
e2c81d
     core->timer_start(reds->mig_timer, MIGRATE_TIMEOUT);
e2c81d
 }