|
From: | zhanghailiang |
Subject: | Re: [Qemu-devel] [PATCH COLO-Frame v8 19/34] qmp event: Add event notification for COLO error |
Date: | Tue, 1 Sep 2015 09:08:11 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 2015/8/31 23:07, Eric Blake wrote:
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.
Will fix in next version.
+ +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).
OK, then i will keep it, and manage all the error places and error messages carefully. Thanks, zhanghailiang
[Prev in Thread] | Current Thread | [Next in Thread] |