From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: libvir-list@redhat.com, "Ján Tomko" <jtomko@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Luiz Capitulino" <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [libvirt] [PATCHv2] Don't log an internal error when the guest hasn't updated balloon stats
Date: Fri, 16 May 2014 00:11:24 -0600 [thread overview]
Message-ID: <5375AC0C.1040708@redhat.com> (raw)
In-Reply-To: <87r43uuuvp.fsf@blackfin.pond.sub.org>
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
On 05/15/2014 11:59 PM, Markus Armbruster wrote:
> Copying Luiz...
>
>>> src/qemu/qemu_monitor_json.c | 18 ++++++++++++++----
>>> 1 file changed, 14 insertions(+), 4 deletions(-)
>>
>>> + if ((data = virJSONValueObjectGet(reply, "error"))) {
>>> + const char *klass = virJSONValueObjectGetString(data, "class");
>>> + const char *desc = virJSONValueObjectGetString(data, "desc");
>>>
>>> - if (ret < 0)
>>> + if (STREQ_NULLABLE(klass, "GenericError") &&
>>> + STREQ_NULLABLE(desc, "guest hasn't updated any stats yet")) {
>
> You snipped so much of the diff that I have trouble finding the place
> this applies.
Apologies; it is for qemuMonitorJSONGetMemoryStats() calling qom-get:
http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/qemu/qemu_monitor_json.c;h=f8ab975695108f3585dfdd869f52b1996e737994;hb=HEAD#l1462
> Is "no stats yet" really an error? Libvirt has done nothing wrong, and
> I'd argue the guest hasn't done anything wrong, either. Should we
> simply return an empty result? Like "cat" on a file that hasn't gotten
> its data, yet.
Yes, that would be reasonable.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-05-16 6:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <d98650b5d89fc5a82ab02e5cafc04a66478052d5.1400138404.git.jtomko@redhat.com>
2014-05-15 21:19 ` [Qemu-devel] [libvirt] [PATCHv2] Don't log an internal error when the guest hasn't updated balloon stats Eric Blake
2014-05-16 5:59 ` Markus Armbruster
2014-05-16 6:11 ` Eric Blake [this message]
2014-05-16 13:13 ` Luiz Capitulino
2014-05-19 6:46 ` Ján Tomko
2014-05-22 12:54 ` Ján Tomko
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=5375AC0C.1040708@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=jtomko@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=libvir-list@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).