[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [libvirt] [PATCHv2] Don't log an internal error when th
From: |
Eric Blake |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
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
signature.asc
Description: OpenPGP digital signature