[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [FOR 0.12 PATCH 18/18] QMP: add human-readable desc
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] Re: [FOR 0.12 PATCH 18/18] QMP: add human-readable description to error response |
Date: |
Tue, 8 Dec 2009 12:11:08 -0200 |
On Tue, 8 Dec 2009 12:25:13 +0000
"Daniel P. Berrange" <address@hidden> wrote:
> On Tue, Dec 08, 2009 at 10:11:48AM -0200, Luiz Capitulino wrote:
> > On Mon, 7 Dec 2009 21:37:16 +0100
> > Markus Armbruster <address@hidden> wrote:
> >
> > > -{ "error": { "class": json-string, "data": json-value }, "id":
> > > json-value }
> > > +{ "error": { "class": json-string, "data": json-value, "desc":
> > > json-string },
> > > + "id": json-value }
> > >
> > > Where,
> > >
> > > - The "class" member contains the error class name (eg.
> > > "ServiceUnavailable")
> > > - The "data" member contains specific error data and is defined in a
> > > per-command basis, it will be an empty json-object if the error has no
> > > data
> > > +- The "desc" member is a human-readable error message. Clients should
> > > + not attempt to parse this message.
> > > - The "id" member contains the transaction identification associated with
> > > the command execution (if issued by the Client)
> >
> > As we've talked on irc, I don't agree with this change.
> >
> > Basically, adding 'desc' to the standard error message introduces all
> > the problems we've discussed about free-form English strings.
> >
> > I feel that QError is becoming the worst of all proposals.
> >
> > I agree with you that it's not as easy as it should be to report errors,
> > but as we're targeting on Clients I was convinced that we could not have the
> > best API internally but offer a good interface for Clients.
> >
> > Now, having 'desc' as part of the standard protocol is like not having
> > the best API internally and offering a bad interface for Clients.
> >
> > Not to mention that those strings can't be modified when the protocol
> > becomes stable and we're probably talking about dozens if not a hundred
> > of strings. Ok, there isn't a reason to change them often, but it's
> > still one more thing to maintain.
>
> I think it is fine to declare that 'desc' strings are subject to
> arbitrary change. Even if QEMU includes this 'desc' I think in libvirt
> will end up doing its own error code -> human string conversion,
> simply because we need to translate the strings. So we'd only use
> 'desc' in any logging calls if it were present.
That's what we would expect from clients, but I'm not convinced that
they'll took the easy way and start using it the way they shouldn't.
- [Qemu-devel] [FOR 0.12 PATCH 00/18] QError conversions and more, Markus Armbruster, 2009/12/07
- [Qemu-devel] [FOR 0.12 PATCH 16/18] QError: New QERR_TOO_MANY_FILES, Markus Armbruster, 2009/12/07
- [Qemu-devel] [FOR 0.12 PATCH 08/18] QError: New QERR_INVALID_BLOCK_FORMAT, Markus Armbruster, 2009/12/07
- [Qemu-devel] [FOR 0.12 PATCH 12/18] QError: New QERR_FD_NOT_FOUND, Markus Armbruster, 2009/12/07
- [Qemu-devel] [FOR 0.12 PATCH 10/18] QError: New QERR_VNC_SERVER_FAILED, Markus Armbruster, 2009/12/07
- [Qemu-devel] [FOR 0.12 PATCH 18/18] QMP: add human-readable description to error response, Markus Armbruster, 2009/12/07
- [Qemu-devel] Re: [FOR 0.12 PATCH 18/18] QMP: add human-readable description to error response, Paolo Bonzini, 2009/12/08
- [Qemu-devel] Re: [FOR 0.12 PATCH 18/18] QMP: add human-readable description to error response, Markus Armbruster, 2009/12/08
- [Qemu-devel] Re: [FOR 0.12 PATCH 18/18] QMP: add human-readable description to error response, Markus Armbruster, 2009/12/08
- Re: [Qemu-devel] Re: [FOR 0.12 PATCH 18/18] QMP: add human-readable description to error response, Anthony Liguori, 2009/12/08
- Re: [Qemu-devel] Re: [FOR 0.12 PATCH 18/18] QMP: add human-readable description to error response, Luiz Capitulino, 2009/12/08
[Qemu-devel] [FOR 0.12 PATCH 04/18] QError: Put error definitions in alphabetical order, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 09/18] QError: New QERR_SET_PASSWD_FAILED, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 13/18] monitor: convert do_closefd() to QError, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 14/18] QError: New QERR_FD_NOT_SUPPLIED, Markus Armbruster, 2009/12/07