Re: [Qemu-devel] [PATCHv2] Don't log an internal error when the guest hasn't updated balloon stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]