[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH COLO-Frame v12 25/38] qmp event: Add event notif
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH COLO-Frame v12 25/38] qmp event: Add event notification for COLO error |
Date: |
Fri, 18 Dec 2015 09:03:22 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 12/15/2015 01:22 AM, zhanghailiang wrote:
> If some errors happen during VM's COLO FT stage, it's important to notify the
> users
> of this event. Together with '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.
>
> Cc: Markus Armbruster <address@hidden>
> Cc: Michael Roth <address@hidden>
> Signed-off-by: zhanghailiang <address@hidden>
> Signed-off-by: Li Zhijian <address@hidden>
> ---
> v11:
> - Fix several typos found by Eric
>
> Signed-off-by: zhanghailiang <address@hidden>
> ---
> +++ b/docs/qmp-events.txt
> @@ -184,6 +184,23 @@ Example:
> Note: The "ready to complete" status is always reset by a BLOCK_JOB_ERROR
> event.
>
> +COLO_EXIT
> +---------
> +
> +Emitted when VM finishes COLO mode due to some errors happening or
> +at the request of users.
> +
> +Data:
> +
> + - "mode": COLO mode, primary or secondary side (json-string)
> + - "reason": the exit reason, internal error or external request.
> (json-string)
> + - "error": error message (json-string, operation)
s/operation/optional/
May want to word it as:
- "error": error message for human consumption (json-string, optional)
to point out that machines shouldn't parse it.
> +++ b/migration/colo.c
> @@ -18,6 +18,7 @@
> #include "qemu/error-report.h"
> #include "qemu/sockets.h"
> #include "migration/failover.h"
> +#include "qapi-event.h"
>
> /* colo buffer */
> #define COLO_BUFFER_BASE_SIZE (4 * 1024 * 1024)
> @@ -349,6 +350,11 @@ static void colo_process_checkpoint(MigrationState *s)
> out:
> if (ret < 0) {
> error_report("%s: %s", __func__, strerror(-ret));
Unrelated: I mentioned in another thread that we may want to start
thinking about adding error_report_errno(); this would be another client.
> +++ b/qapi-schema.json
> @@ -778,6 +778,22 @@
> 'data': [ 'unknown', 'primary', 'secondary'] }
>
> ##
> +# @COLOExitReason
> +#
> +# The reason for a COLO exit
> +#
> +# @unknown: unknown reason
> +#
If we never return 'unknown', then it is not worth having it in the enum
(we can always add it later if we find a reason to have it; but adding
it now feels premature if the code base isn't using it).
Otherwise looks okay to me.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH COLO-Frame v12 26/38] COLO failover: Shutdown related socket fd when do failover, (continued)
- [Qemu-devel] [PATCH COLO-Frame v12 24/38] COLO: Implement failover work for Secondary VM, zhanghailiang, 2015/12/15
- [Qemu-devel] [PATCH COLO-Frame v12 19/38] COLO: Add checkpoint-delay parameter for migrate-set-parameters, zhanghailiang, 2015/12/15
- [Qemu-devel] [PATCH COLO-Frame v12 28/38] COLO: Process shutdown command for VM in COLO state, zhanghailiang, 2015/12/15
- [Qemu-devel] [PATCH COLO-Frame v12 30/38] savevm: Split load vm state function qemu_loadvm_state, zhanghailiang, 2015/12/15
- [Qemu-devel] [PATCH COLO-Frame v12 25/38] qmp event: Add event notification for COLO error, zhanghailiang, 2015/12/15
- [Qemu-devel] [PATCH COLO-Frame v12 33/38] net/filter-buffer: Add default filter-buffer for each netdev, zhanghailiang, 2015/12/15
- [Qemu-devel] [PATCH COLO-Frame v12 38/38] COLO: Add block replication into colo process, zhanghailiang, 2015/12/15
- [Qemu-devel] [PATCH COLO-Frame v12 37/38] colo: Use default buffer-filter to buffer and release packets, zhanghailiang, 2015/12/15
- [Qemu-devel] [PATCH COLO-Frame v12 35/38] filter-buffer: Introduce a helper function to enable/disable default filter, zhanghailiang, 2015/12/15