migrate: Fix cancelling state warning
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 19 Jul 2018 09:22:57 +0000 (10:22 +0100)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Tue, 24 Jul 2018 16:00:45 +0000 (17:00 +0100)
We've been getting the warning:

migration_iteration_finish: Unknown ending state 2

on a cancel.

I think that's originally due to 39b9e17905c;  although
I've only seen the warning, I think that in some cases
that we could find the VM stays paused after a cancel where
it should restart.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20180719092257.12703-1-dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/migration.c

index 8d56d5693052b5e78b7deca92f575f91641176f7..db6bde745389200981093d1ee94e5b8eacdd2b7d 100644 (file)
@@ -2877,6 +2877,7 @@ static void migration_iteration_finish(MigrationState *s)
         /* Fallthrough */
     case MIGRATION_STATUS_FAILED:
     case MIGRATION_STATUS_CANCELLED:
+    case MIGRATION_STATUS_CANCELLING:
         if (s->vm_was_running) {
             vm_start();
         } else {