[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 39/40] Migration: Generate the completed event only
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 39/40] Migration: Generate the completed event only when we complete |
Date: |
Wed, 21 Oct 2015 12:52:09 -0500 |
From: "Dr. David Alan Gilbert" <address@hidden>
The current migration-completed event is generated a bit too early,
which means that an eager libvirt that's ready to go as soon
as it sees the event ends up racing with the actual end of migration.
This corresponds to RH bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1271145
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
xSigned-off-by: Juan Quintela <address@hidden>
(cherry picked from commit ed1f3e0090069dcb9458aa9e450df12bf8eba0b0)
Signed-off-by: Michael Roth <address@hidden>
---
migration/migration.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/migration/migration.c b/migration/migration.c
index 662e77e..c4a7d0b 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -286,12 +286,12 @@ static void process_incoming_migration_co(void *opaque)
migrate_decompress_threads_join();
exit(EXIT_FAILURE);
}
- migrate_generate_event(MIGRATION_STATUS_COMPLETED);
qemu_announce_self();
/* Make sure all file formats flush their mutable metadata */
bdrv_invalidate_cache_all(&local_err);
if (local_err) {
+ migrate_generate_event(MIGRATION_STATUS_FAILED);
error_report_err(local_err);
migrate_decompress_threads_join();
exit(EXIT_FAILURE);
@@ -312,6 +312,12 @@ static void process_incoming_migration_co(void *opaque)
runstate_set(global_state_get_runstate());
}
migrate_decompress_threads_join();
+ /*
+ * This must happen after any state changes since as soon as an external
+ * observer sees this event they might start to prod at the VM assuming
+ * it's ready to use.
+ */
+ migrate_generate_event(MIGRATION_STATUS_COMPLETED);
}
void process_incoming_migration(QEMUFile *f)
--
1.9.1
- [Qemu-stable] [PATCH 02/40] mirror: Fix coroutine reentrance, (continued)
- [Qemu-stable] [PATCH 02/40] mirror: Fix coroutine reentrance, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 31/40] virtio-net: unbreak self announcement and guest offloads after migration, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 32/40] vmxnet3: Drop net_vmxnet3_info.can_receive, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 30/40] virtio: avoid leading underscores for helpers, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 35/40] Revert "qdev: Use qdev_get_device_class() for -device <type>, help", Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 33/40] qmp: Fix device-list-properties not to crash for abstract device, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 34/40] qdev: Protect device-list-properties against broken devices, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 36/40] misc: zynq_slcr: Fix MMIO writes, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 37/40] s390x/kvm: Fix vector validity bit in device machine checks, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 38/40] util/qemu-config: fix missing machine command line options, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 39/40] Migration: Generate the completed event only when we complete,
Michael Roth <=
- [Qemu-stable] [PATCH 40/40] virtio-input: ignore events until the guest driver is ready, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 04/40] block/iscsi: validate block size returned from target, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 03/40] target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdb, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 06/40] block/nfs: fix calculation of allocated file size, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 05/40] exec-all: Translate TCI return addresses backwards too, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 07/40] qemu-img: Fix crash in amend invocation, Michael Roth, 2015/10/21
- [Qemu-stable] [PATCH 08/40] mac_dbdma: always clear FLUSH bit once DBDMA channel flush is complete, Michael Roth, 2015/10/21
- Re: [Qemu-stable] [Qemu-devel] [PATCH 00/40] Patch Round-up for stable 2.4.1, freeze on 2015-10-29, Cole Robinson, 2015/10/21