qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V4 10/16] qmp event: Add COLO_EXIT event to noti


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH V4 10/16] qmp event: Add COLO_EXIT event to notify users while exited COLO
Date: Sat, 03 Feb 2018 16:49:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Zhang Chen <address@hidden> writes:

> From: zhanghailiang <address@hidden>
>
> 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 <address@hidden>
> Signed-off-by: Li Zhijian <address@hidden>
> Signed-off-by: Zhang Chen <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
[...]
> diff --git a/qapi/migration.json b/qapi/migration.json
> index 70e7b67..6fc95b7 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -869,6 +869,41 @@
>    '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: which COLO mode the VM was in when it exited.
> +#
> +# @reason: describes the reason for the COLO exit.
> +#
> +# Since: 2.12
> +#
> +# Example:
> +#
> +# <- { "timestamp": {"seconds": 2032141960, "microseconds": 417172},
> +#      "event": "COLO_EXIT", "data": {"mode": "primary", "reason": "request" 
> } }
> +#
> +##
> +{ 'event': 'COLO_EXIT',
> +  'data': {'mode': 'COLOMode', 'reason': 'COLOExitReason' } }

Standard question when I see a new event: is there a way to poll for the
event's information?  If not, why don't we need one?

Remember, management applications might miss events when they lose the
connection and have to reconnect, say because the management application
needs to be restarted.

> +
> +##
> +# @COLOExitReason:
> +#
> +# The reason for a COLO exit
> +#
> +# @request: COLO exit is due to an external request
> +#
> +# @error: COLO exit is due to an internal error
> +#
> +# Since: 2.12
> +##
> +{ 'enum': 'COLOExitReason',
> +  'data': [ 'request', 'error' ] }
> +
> +##
>  # @x-colo-lost-heartbeat:
>  #
>  # Tell qemu that heartbeat is lost, request it to do takeover procedures.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]