Migration/colo.c: Make COLO node running after failover
authorZhang Chen <chen.zhang@intel.com>
Sun, 3 Mar 2019 14:50:17 +0000 (22:50 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Wed, 6 Mar 2019 10:49:18 +0000 (10:49 +0000)
Delay to close COLO for auto start VM after failover.

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20190303145021.2962-4-chen.zhang@intel.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/colo.c
migration/migration.c

index a916dc178cb46de7e91096d2412e2ae612989191..5ba610dc0177f0c049ba2145d27399f9ce160115 100644 (file)
@@ -874,7 +874,6 @@ out:
         qemu_fclose(mis->to_src_file);
         mis->to_src_file = NULL;
     }
-    migration_incoming_disable_colo();
 
     rcu_unregister_thread();
     return NULL;
index 952d29243e1c741d7ae2572451dfdc4e2b75682d..df6fd8e0e50667d18c13f21b16c58c48f908a64e 100644 (file)
@@ -417,6 +417,9 @@ static void process_incoming_migration_bh(void *opaque)
         } else {
             runstate_set(RUN_STATE_PAUSED);
         }
+    } else if (migration_incoming_colo_enabled()) {
+        migration_incoming_disable_colo();
+        vm_start();
     } else {
         runstate_set(global_state_get_runstate());
     }