[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/12] migration/colo.c: Move colo_notify_compares_event to the ri
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 11/12] migration/colo.c: Move colo_notify_compares_event to the right place |
Date: |
Mon, 1 Jun 2020 19:40:03 +0100 |
From: Lukas Straub <lukasstraub2@web.de>
If the secondary has to failover during checkpointing, it still is
in the old state (i.e. different state than primary). Thus we can't
expose the primary state until after the checkpoint is sent.
This fixes sporadic connection reset of client connections during
failover.
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Message-Id:
<d4555dd5146a54518c4d9d4efd996b7c745c6687.1589193382.git.lukasstraub2@web.de>
Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/colo.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/migration/colo.c b/migration/colo.c
index 59639f519f..ea7d1e9d4e 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -436,12 +436,6 @@ static int colo_do_checkpoint_transaction(MigrationState
*s,
goto out;
}
- qemu_event_reset(&s->colo_checkpoint_event);
- colo_notify_compares_event(NULL, COLO_EVENT_CHECKPOINT, &local_err);
- if (local_err) {
- goto out;
- }
-
/* Disable block migration */
migrate_set_block_enabled(false, &local_err);
if (local_err) {
@@ -503,6 +497,12 @@ static int colo_do_checkpoint_transaction(MigrationState
*s,
goto out;
}
+ qemu_event_reset(&s->colo_checkpoint_event);
+ colo_notify_compares_event(NULL, COLO_EVENT_CHECKPOINT, &local_err);
+ if (local_err) {
+ goto out;
+ }
+
colo_receive_check_message(s->rp_state.from_dst_file,
COLO_MESSAGE_VMSTATE_LOADED, &local_err);
if (local_err) {
--
2.26.2
- Re: [PULL 04/12] hmp: Simplify qom-set, (continued)
[PULL 01/12] migration/rdma: fix potential nullptr access in rdma_start_incoming_migration, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 05/12] virtiofsd: remove symlink fallbacks, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 08/12] migration/colo.c: Use cpu_synchronize_all_states(), Dr. David Alan Gilbert (git), 2020/06/01
[PULL 06/12] migration/vmstate: Remove unnecessary MemoryRegion forward declaration, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 09/12] migration/colo.c: Flush ram cache only after receiving device state, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 10/12] migration/colo.c: Relaunch failover even if there was an error, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 07/12] migration/colo.c: Use event instead of semaphore, Dr. David Alan Gilbert (git), 2020/06/01
[PULL 11/12] migration/colo.c: Move colo_notify_compares_event to the right place,
Dr. David Alan Gilbert (git) <=
[PULL 12/12] migration/migration.c: Fix hang in ram_save_host_page, Dr. David Alan Gilbert (git), 2020/06/01
Re: [PULL 00/12] migration/virtiofs/hmp queue, Peter Maydell, 2020/06/02