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 <lcapitul...@redhat.com>
> 
> 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 <ebl...@redhat.com>


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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to