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

Luiz Capitulino lcapitulino at redhat.com
Fri May 16 13:13:59 UTC 2014


On Fri, 16 May 2014 00:11:24 -0600
Eric Blake <eblake at redhat.com> wrote:

> > Is "no stats yet" really an error? 

This is a special case where the guest hasn't ever filled QEMU with balloon
stats. There are two possible cases. Either the guest hasn't done it yet, but
will do in the future or the guest will never do it (eg. the guest doesn't
support balloon, the guest crashed, etc).

> > 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.

I'm fine with the two possible solutions here: adding a new TryAgain error
class or returning an "empty" result.

I say "empty" because those fields are not optionals, so we'll have to fill
them with some value. Shouldn't be a problem for most fields, as the spec
(docs/virtio-balloon-stats.txt) already defines that stats that the guest
doesn't report are returned as -1. The only exception here is the last-update
field, which can't hold a negative iirc. The only choice is to return 0 there.
I guess that this shouldn't be a problem either.

Who volunteers to fix this?




More information about the libvir-list mailing list