[Top][All Lists]
[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>
>
>
- [Qemu-devel] [PATCH 19/34] block: block_int: include qerror.h, (continued)
- [Qemu-devel] [PATCH 19/34] block: block_int: include qerror.h, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 20/34] hmp: hmp.h: include qdict.h, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 22/34] qapi: generate correct enum names for camel case enums, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 23/34] qapi: don't convert enum strings to lowercase, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 29/34] qmp: switch to the new error format on the wire, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 30/34] qemu-ga: switch to the new error format on the wire, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 32/34] qerror: drop qerror_table and qerror_format(), Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 27/34] qerror: add proper ErrorClass value for QERR_ macros, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 28/34] error: add error_get_class(), Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 25/34] qerror: qerror_table: don't use C99 struct initializers, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 34/34] error, qerror: drop QDict member, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 26/34] error, qerror: add ErrorClass argument to error functions, Luiz Capitulino, 2012/08/01
- [Qemu-devel] [PATCH 33/34] error: drop error_get_qobject()/error_set_qobject(), Luiz Capitulino, 2012/08/01