From: Michal Privoznik <mprivozn@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH] qapi: Reintroduce CommandDisabled error class
Date: Thu, 29 Aug 2019 15:04:43 +0200 [thread overview]
Message-ID: <f6ae646f-620d-964a-dd36-e6f636fc08da@redhat.com> (raw)
In-Reply-To: <87v9ugrx2k.fsf@dusky.pond.sub.org>
On 8/29/19 2:10 PM, Markus Armbruster wrote:
> Michal Privoznik <mprivozn@redhat.com> writes:
>
>> If there was a disabled command, then qemu-ga used to report
>> CommandDisabled error class (among with human readable
>> description). This changed in v1.2.0-rc0~28^2~16 in favor of
>> GenericError class.
>
> Really? I believe it was slightly earlier in the same series:
>
> 93b91c59db qemu-ga: switch to the new error format on the wire
> de253f1491 qmp: switch to the new error format on the wire
Ah, you're right. It's the first commit that you reference.
>
> The commit you mention (df1e608a01e) is merely follow-up simplification.
>
>> While the change might work for other
>> classes, this one should not have been dropped because it helps
>> callers distinguish the root cause of the error.
>>
>> A bit of background: up until very recently libvirt used qemu-ga
>> in all or nothing way. It didn't care why a qemu-ga command
>> failed. But very recently a new API was introduced which
>> implements 'best effort' approach (in some cases) and thus
>> libvirt must differentiate between: {CommandNotFound,
>> CommandDisabled} and some generic error. While the former classes
>> mean the API can issue some other commands the latter raises a
>> red flag causing the API to fail.
>
> Why do you need to distinguish CommandNotFound from CommandDisabled?
I don't. That's why I've put them both in curly braces. Perhaps this
says its better:
switch (klass) {
case CommandNotFound:
case CommandDisabled:
/* okay */
break;
default:
/* bad, error out */
break;
}
>
>> This reverts df1e608a01 partially.
>>
>> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Michal
next prev parent reply other threads:[~2019-08-29 13:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-29 9:14 [Qemu-devel] [PATCH] qapi: Reintroduce CommandDisabled error class Michal Privoznik
2019-08-29 12:10 ` Markus Armbruster
2019-08-29 13:04 ` Michal Privoznik [this message]
2019-08-29 13:12 ` Eric Blake
2019-08-29 13:24 ` Michal Privoznik
2019-08-30 11:52 ` Markus Armbruster
2019-08-30 13:29 ` Michal Privoznik
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=f6ae646f-620d-964a-dd36-e6f636fc08da@redhat.com \
--to=mprivozn@redhat.com \
--cc=armbru@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.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).