qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	aliguori@us.ibm.com, qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] Adding errno to QMP errors
Date: Fri, 15 Jun 2012 11:46:00 -0300	[thread overview]
Message-ID: <20120615114600.09d30d1c@doriath.home> (raw)
In-Reply-To: <20120613144910.598bfe24@doriath.home>

On Wed, 13 Jun 2012 14:49:10 -0300
Luiz Capitulino <lcapitulino@redhat.com> wrote:

> On Thu, 31 May 2012 16:54:47 +0200
> Paolo Bonzini <pbonzini@redhat.com> wrote:
> 
> > Wait, I think you're conflating two things.
> > 
> > One is "do not shoehorn errors into errno values".  So for QOM invalid values we
> > have PropertyValueBad, not a generic InvalidArgument value.  We convert everything
> > to Error rather than returning negative errno values and then returning generic
> > error codes, because those would be ugly and non-descriptive.  I agree with that.
> > 
> > The other is "when errors come straight from the OS, _do_ use errno values".
> > This is for OpenFileFailed, for the new socket errors and so on.  This is what
> > I am proposing.
> 
> [...]
> 
> >     $ echo | sed p > /dev/full
> >     sed: couldn't flush stdout: No space left on device
> >          ^^^^^^^^^^^^^^                                 error type
> >                         ^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^ arguments
> > 
> > That would become, in JSON:
> > 
> >     { 'error': 'FlushFailed',
> >       'file': 'stdout',
> >       'os_error': 'enospc' }
> 
> This is not a new discussion and what we're doing today is to return errno
> as a QError class name. So, for the example above we'd return something like:
> 
>  { 'error': 'NoSpace' }
> 
> It's possible to add new optional values if you need more information, but
> I know that that's not what you're asking.
> 
> I mostly agree that your version would be better, the only problem I see
> is that this is probably going to mess a bit more our API as we have been
> doing like my example above for some time.
> 
> Anthony, the current design was mostly influenced by you and you had
> objections on doing what Paolo and Kevin are suggesting. What do you think?

Ping?

We have to reach a consensus of this because this is holding qapi conversions.

  reply	other threads:[~2012-06-15 14:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1338387301-10074-1-git-send-email-lcapitulino@redhat.com>
     [not found] ` <1338387301-10074-3-git-send-email-lcapitulino@redhat.com>
     [not found]   ` <4FC74B1A.8080700@redhat.com>
     [not found]     ` <20120531110608.4dc3fe22@doriath.home>
     [not found]       ` <4FC77F6C.8000008@redhat.com>
     [not found]         ` <20120531113127.1c8aa213@doriath.home>
     [not found]           ` <4FC78637.4040605@redhat.com>
     [not found]             ` <20120531124411.659ed161@doriath.home>
     [not found]               ` <4FC79316.6080603@redhat.com>
     [not found]                 ` <20120531130814.5779aae9@doriath.home>
2012-06-01 12:40                   ` [Qemu-devel] [PATCH 02/14] qerror: add new errors Kevin Wolf
2012-06-13 17:49             ` [Qemu-devel] Adding errno to QMP errors Luiz Capitulino
2012-06-15 14:46               ` Luiz Capitulino [this message]
2012-06-15 16:52               ` Anthony Liguori
2012-06-15 16:55                 ` Paolo Bonzini
2012-06-15 17:48                   ` Anthony Liguori
2012-06-15 19:11                     ` Paolo Bonzini
2012-06-15 17:02                 ` Luiz Capitulino
2012-06-15 17:23                   ` Kevin Wolf
2012-06-15 17:03                 ` Daniel P. Berrange
2012-06-18 15:41                   ` Markus Armbruster
2012-06-18 18:31                     ` Anthony Liguori
2012-06-19  7:39                       ` Kevin Wolf
2012-06-19  9:20                         ` Daniel P. Berrange
2012-06-19  9:31                           ` Kevin Wolf
2012-06-19 13:12                       ` Luiz Capitulino
2012-06-20 17:48                         ` [Qemu-devel] [RFC] Fixing the error failure Luiz Capitulino
2012-06-20 18:46                           ` Anthony Liguori
2012-06-20 19:40                             ` Luiz Capitulino
2012-06-20 19:47                               ` Anthony Liguori
2012-06-20 20:13                                 ` Luiz Capitulino
2012-06-21 12:42                           ` Daniel P. Berrange
     [not found]                             ` <20120625165651.31f9e0bd@doriath.home>
     [not found]                               ` <m34npyld8y.fsf@blackfin.pond.sub.org>
     [not found]                                 ` <20120626093511.GD14451@redhat.com>
     [not found]                                   ` <m3hatyco9g.fsf@blackfin.pond.sub.org>
     [not found]                                     ` <4FE9E275.40303@codemonkey.ws>
     [not found]                                       ` <m3txxvq3i3.fsf@blackfin.pond.sub.org>
2012-07-02 12:47                                         ` Anthony Liguori
2012-07-02 13:47                                           ` Luiz Capitulino
2012-07-02  8:03                           ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120615114600.09d30d1c@doriath.home \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).