qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH COLO-Frame v8 19/34] qmp event: Add event notifi


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH COLO-Frame v8 19/34] qmp event: Add event notification for COLO error
Date: Mon, 31 Aug 2015 09:07:07 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 08/31/2015 03:27 AM, zhanghailiang wrote:

>>> +Data: None.
>>> +
>>> + - "mode": COLO mode, 'primary' or 'secondary'
>>> + - "error": Error message (json-string, optional)

The "Data: None" designation is inconsistent with the fact that you do
provide data.

>>> +
>>> +Example:
>>> +
>>> +{"timestamp": {"seconds": 2032141960, "microseconds": 417172},
>>> + "event": "COLO_EXIT", "data": {"mode": "primary"}}
>>
>> It might also be useful to provide a machine-parseable parameter on
>> whether the exit was due to an internal error vs. an external request.
>> Maybe by adding 'flag':'bool', since presence or absence of 'error' is
>> not as nice.
>>
> 
> Good idea, but i think the type of 'flag' changes to 'str' maybe better,
> which can be 'error' or
> 'request', 'bool' is not so self-explanatory.
> The original reason for adding 'error' member is to help
> users to know what exactly happen, but it seems to be difficult to 
> exactly class all errors,
> so i will remove it.

Keeping an optional 'error' for human consumption is not bad; it's just
that it is also nice to provide something for machine consumption (and
we typically document that machines should NOT parse 'error' messages).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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