qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 30/34] qemu-ga: switch to the new error format o


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 30/34] qemu-ga: switch to the new error format on the wire
Date: Fri, 03 Aug 2012 11:56:29 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

On 08/03/2012 11:44 AM, Michael Roth wrote:
> On Wed, Aug 01, 2012 at 10:02:50PM -0300, Luiz Capitulino wrote:
>> IMPORTANT: this BREAKS qemu-ga compatibility for the error response.
>>
>> Instead of returning something like:
>>
>> { "error": { "class": "InvalidParameterValue",
>>              "data": {"name": "mode", "expected": "halt|powerdown|reboot" } 
>> } }
>>
>> qemu-ga now returns:
>>
>>  { "error": { "class": "GenericError",
>>               "desc": "Parameter 'mode' expects halt|powerdown|reboot" } }
> 

>>
>> Notice that this is also a bug fix, as qemu-ga wasn't returning the
>> human message.
>>
>> Signed-off-by: Luiz Capitulino <address@hidden>
> 
> So, if the libvirt folks are okay with it:

The only use libvirt made of existing qemu-ga errors was to stringify
them in order to pass on an error message to the user when a command
failed.  Existing libvirt attempts to look up the 'desc' field, and when
it is lacking, then attempts to stringify the 'class' field based on a
finite list of known classes.  Qemu is now shrinking the list of known
classes but providing a 'desc' field, so the error message quality in
libvirt will actually improve.  After reading libvirt's
src/qemu/qemu_agent.c, I don't see any problem with this patch from
libvirt's point of view.

Reviewed-by: Eric Blake <address@hidden>


-- 
Eric Blake   address@hidden    +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]