diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 2023-05-17 15:37:52 +0300 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-06-02 01:03:19 +0200 |
commit | a4c6275aa11f153a6a7e614dd867c62b904f8838 (patch) | |
tree | 9d7627a3c765fe18be5a12b93648a42dbcd755de /migration | |
parent | f4584076fc318bb4ac762e3c09ff3544938fed5b (diff) |
migration: restore vmstate on migration failure
1. Otherwise failed migration just drops guest-panicked state, which is
not good for management software.
2. We do keep different paused states like guest-panicked during
migration with help of global_state state.
3. We do restore running state on source when migration is cancelled or
failed.
4. "postmigrate" state is documented as "guest is paused following a
successful 'migrate'", so originally it's only for successful path
and we never documented current behavior.
Let's restore paused states like guest-panicked in case of cancel or
fail too. Allow same transitions like for inmigrate state.
This commit changes the behavior that was introduced by commit
42da5550d6 "migration: set state to post-migrate on failure" and
provides a bit different fix on related
https://bugzilla.redhat.com/show_bug.cgi?id=1355683
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230517123752.21615-6-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/migration.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/migration.c b/migration/migration.c index 033162cda0..7c3425c6fe 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2772,7 +2772,7 @@ static void migration_iteration_finish(MigrationState *s) } } else { if (runstate_check(RUN_STATE_FINISH_MIGRATE)) { - runstate_set(RUN_STATE_POSTMIGRATE); + runstate_set(s->vm_old_state); } } break; |