[Top][All Lists]

[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: Luiz Capitulino
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 09:13:59 -0400

On Fri, 16 May 2014 00:11:24 -0600
Eric Blake <address@hidden> 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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]