[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/7] migration: set state to post-migrate on failure
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PULL 1/7] migration: set state to post-migrate on failure |
Date: |
Fri, 22 Jul 2016 13:30:47 +0530 |
From: "Dr. David Alan Gilbert" <address@hidden>
If a migration fails/is cancelled during the postcopy stage we currently
end up with the runstate as finish-migrate, where it should be post-migrate.
There's a small window in precopy where I think the same thing can
happen, but I've never seen it.
It rarely matters; the only postcopy case is if you restart a migration, which
again is a case that rarely matters in postcopy because it's only
safe to restart the migration if you know the destination hasn't
been running (which you might if you started the destination with -S
and hadn't got around to 'c' ing it before the postcopy failed).
Even then it's a small window but potentially you could hit if
there's a problem loading the devices on the destination.
This corresponds to:
https://bugzilla.redhat.com/show_bug.cgi?id=1355683
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Amit Shah <address@hidden>
---
migration/migration.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/migration/migration.c b/migration/migration.c
index c4e0193..955d5ee 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1837,6 +1837,10 @@ static void *migration_thread(void *opaque)
} else {
if (old_vm_running && !entered_postcopy) {
vm_start();
+ } else {
+ if (runstate_check(RUN_STATE_FINISH_MIGRATE)) {
+ runstate_set(RUN_STATE_POSTMIGRATE);
+ }
}
}
qemu_bh_schedule(s->cleanup_bh);
--
2.7.4
- [Qemu-devel] [PULL 0/7] migration: fix, perf testing framework, Amit Shah, 2016/07/22
- [Qemu-devel] [PULL 1/7] migration: set state to post-migrate on failure,
Amit Shah <=
- [Qemu-devel] [PULL 2/7] scripts: add __init__.py file to scripts/qmp/, Amit Shah, 2016/07/22
- [Qemu-devel] [PULL 3/7] scripts: add a 'debug' parameter to QEMUMonitorProtocol, Amit Shah, 2016/07/22
- [Qemu-devel] [PULL 4/7] scripts: refactor the VM class in iotests for reuse, Amit Shah, 2016/07/22
- [Qemu-devel] [PULL 5/7] scripts: set timeout when waiting for qemu monitor connection, Amit Shah, 2016/07/22
- [Qemu-devel] [PULL 6/7] scripts: ensure monitor socket has SO_REUSEADDR set, Amit Shah, 2016/07/22
- [Qemu-devel] [PULL 7/7] tests: introduce a framework for testing migration performance, Amit Shah, 2016/07/22
- Re: [Qemu-devel] [PULL 0/7] migration: fix, perf testing framework, Peter Maydell, 2016/07/22