* [Qemu-devel] [PATCH] migration: set state to post-migrate on failure
@ 2016-07-15 16:44 Dr. David Alan Gilbert (git)
2016-07-18 10:56 ` Amit Shah
0 siblings, 1 reply; 2+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2016-07-15 16:44 UTC (permalink / raw)
To: qemu-devel, amit.shah, quintela
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
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 <dgilbert@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: set state to post-migrate on failure
2016-07-15 16:44 [Qemu-devel] [PATCH] migration: set state to post-migrate on failure Dr. David Alan Gilbert (git)
@ 2016-07-18 10:56 ` Amit Shah
0 siblings, 0 replies; 2+ messages in thread
From: Amit Shah @ 2016-07-18 10:56 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git); +Cc: qemu-devel, quintela
On (Fri) 15 Jul 2016 [17:44:46], Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> 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 <dgilbert@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Amit
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-18 10:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-15 16:44 [Qemu-devel] [PATCH] migration: set state to post-migrate on failure Dr. David Alan Gilbert (git)
2016-07-18 10:56 ` Amit Shah
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).