aboutsummaryrefslogtreecommitdiff
path: root/qapi/migration.json
diff options
context:
space:
mode:
authorzhanghailiang <zhang.zhanghailiang@huawei.com>2018-09-03 12:38:51 +0800
committerJason Wang <jasowang@redhat.com>2018-10-19 11:15:03 +0800
commit9ecff6d66e196701de92f596c250e34c1bd11432 (patch)
tree184b9393bd77338dc7c3ac0c6c7c50531f41e537 /qapi/migration.json
parente6f4aa188cf1849b2a4949e62fb04ea44ca0d083 (diff)
qmp event: Add COLO_EXIT event to notify users while exited COLO
If some errors happen during VM's COLO FT stage, it's important to notify the users of this event. Together with 'x-colo-lost-heartbeat', Users can intervene in COLO's failover work immediately. If users don't want to get involved in COLO's failover verdict, it is still necessary to notify users that we exited COLO mode. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Zhang Chen <zhangckid@gmail.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'qapi/migration.json')
-rw-r--r--qapi/migration.json38
1 files changed, 38 insertions, 0 deletions
diff --git a/qapi/migration.json b/qapi/migration.json
index 6e8c21258a..4a18209e03 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -957,6 +957,44 @@
'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
##
+# @COLO_EXIT:
+#
+# Emitted when VM finishes COLO mode due to some errors happening or
+# at the request of users.
+#
+# @mode: report COLO mode when COLO exited.
+#
+# @reason: describes the reason for the COLO exit.
+#
+# Since: 3.1
+#
+# Example:
+#
+# <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
+# "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" } }
+#
+##
+{ 'event': 'COLO_EXIT',
+ 'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }
+
+##
+# @COLOExitReason:
+#
+# The reason for a COLO exit
+#
+# @none: no failover has ever happened. This can't occur in the
+# COLO_EXIT event, only in the result of query-colo-status.
+#
+# @request: COLO exit is due to an external request
+#
+# @error: COLO exit is due to an internal error
+#
+# Since: 3.1
+##
+{ 'enum': 'COLOExitReason',
+ 'data': [ 'none', 'request', 'error' ] }
+
+##
# @x-colo-lost-heartbeat:
#
# Tell qemu that heartbeat is lost, request it to do takeover procedures.