From 5ed0deca41b201a66d858d7296fe6b780d757404 Mon Sep 17 00:00:00 2001 From: Zhang Chen Date: Fri, 22 Mar 2019 18:13:33 +0800 Subject: Migration/colo.c: Make user obtain the last COLO mode info after failover Add the last_colo_mode to save the status after failover. This patch can solve the issue that user want to get last colo mode use query_colo_status after failover. Signed-off-by: Zhang Chen Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- qapi/migration.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'qapi') diff --git a/qapi/migration.json b/qapi/migration.json index e383951765..cfde29acf8 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1380,12 +1380,17 @@ # @mode: COLO running mode. If COLO is running, this field will return # 'primary' or 'secondary'. # +# @last_mode: COLO last running mode. If COLO is running, this field +# will return same like mode field, after failover we can +# use this field to get last colo mode. (since 4.1) +# # @reason: describes the reason for the COLO exit. # # Since: 3.1 ## { 'struct': 'COLOStatus', - 'data': { 'mode': 'COLOMode', 'reason': 'COLOExitReason' } } + 'data': { 'mode': 'COLOMode', 'last_mode': 'COLOMode', + 'reason': 'COLOExitReason' } } ## # @query-colo-status: -- cgit v1.2.3