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

Eric Blake eblake at redhat.com
Fri May 16 06:11:24 UTC 2014


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140516/499d3719/attachment-0001.sig>


More information about the libvir-list mailing list