[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/27] migration: Network Failover can't work with a paused gu
From: |
Juan Quintela |
Subject: |
[PATCH v2 01/27] migration: Network Failover can't work with a paused guest |
Date: |
Wed, 18 Nov 2020 09:37:22 +0100 |
If we have a paused guest, it can't unplug the network VF device, so
we wait there forever. Just change the code to give one error on that
case.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/migration.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/migration/migration.c b/migration/migration.c
index 87a9b59f83..d44fc880f9 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3548,6 +3548,18 @@ static void *migration_thread(void *opaque)
qemu_savevm_state_setup(s->to_dst_file);
if (qemu_savevm_state_guest_unplug_pending()) {
+ /* if guest is paused, it can send back the wait event */
+ if (!runstate_is_running()) {
+ Error *local_err = NULL;
+
+ error_setg(&local_err, "migration: network failover and "
+ "guest is paused'");
+ migrate_set_error(s, local_err);
+ error_free(local_err);
+ migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
+ MIGRATION_STATUS_FAILED);
+ goto end;
+ }
migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
MIGRATION_STATUS_WAIT_UNPLUG);
@@ -3597,6 +3609,7 @@ static void *migration_thread(void *opaque)
}
trace_migration_thread_after_loop();
+end:
migration_iteration_finish(s);
object_unref(OBJECT(s));
rcu_unregister_thread();
--
2.26.2
- [PATCH v2 00/27] Virtio net failover fixes, Juan Quintela, 2020/11/18
- [PATCH v2 01/27] migration: Network Failover can't work with a paused guest,
Juan Quintela <=
- [PATCH v2 02/27] failover: fix indentantion, Juan Quintela, 2020/11/18
- [PATCH v2 04/27] failover: primary bus is only used once, and where it is set, Juan Quintela, 2020/11/18
- [PATCH v2 03/27] failover: Use always atomics for primary_should_be_hidden, Juan Quintela, 2020/11/18
- [PATCH v2 05/27] failover: Remove unused parameter, Juan Quintela, 2020/11/18
- [PATCH v2 06/27] failover: Remove external partially_hotplugged property, Juan Quintela, 2020/11/18
- [PATCH v2 08/27] failover: Rename bool to failover_primary_hidden, Juan Quintela, 2020/11/18
- [PATCH v2 09/27] failover: g_strcmp0() knows how to handle NULL, Juan Quintela, 2020/11/18
- [PATCH v2 07/27] failover: qdev_device_add() returns err or dev set, Juan Quintela, 2020/11/18
- [PATCH v2 10/27] failover: Remove primary_device_opts, Juan Quintela, 2020/11/18