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: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH 30/34] qemu-ga: switch to the new error format on the wire
Date: Fri, 3 Aug 2012 15:02:25 -0300

On Fri, 03 Aug 2012 11:56:29 -0600
Eric Blake <address@hidden> wrote:

> 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.

Yeah, I actually have a request from Michal to do just that (add 'desc'
to qemu-ga's errors).

> 
> Reviewed-by: Eric Blake <address@hidden>
> 
> 




reply via email to

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