From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlBWP-00069t-Vo for qemu-devel@nongnu.org; Fri, 16 May 2014 02:21:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlBWL-0003w9-1T for qemu-devel@nongnu.org; Fri, 16 May 2014 02:21:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlBWK-0003w3-PG for qemu-devel@nongnu.org; Fri, 16 May 2014 02:21:28 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4G6LRg6015102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 16 May 2014 02:21:27 -0400 Message-ID: <5375AC0C.1040708@redhat.com> Date: Fri, 16 May 2014 00:11:24 -0600 From: Eric Blake MIME-Version: 1.0 References: <53752F73.3030506@redhat.com> <87r43uuuvp.fsf@blackfin.pond.sub.org> In-Reply-To: <87r43uuuvp.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="seHBqjMNjL6OLtpdlFarWnSqfLF0OQaLd" Subject: Re: [Qemu-devel] [libvirt] [PATCHv2] Don't log an internal error when the guest hasn't updated balloon stats List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: libvir-list@redhat.com, =?UTF-8?B?SsOhbiBUb21rbw==?= , "qemu-devel@nongnu.org" , Luiz Capitulino This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --seHBqjMNjL6OLtpdlFarWnSqfLF0OQaLd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/15/2014 11:59 PM, Markus Armbruster wrote: > Copying Luiz... >=20 >>> src/qemu/qemu_monitor_json.c | 18 ++++++++++++++---- >>> 1 file changed, 14 insertions(+), 4 deletions(-) >> >>> + if ((data =3D virJSONValueObjectGet(reply, "error"))) { >>> + const char *klass =3D virJSONValueObjectGetString(data, "cla= ss"); >>> + const char *desc =3D virJSONValueObjectGetString(data, "desc= "); >>> =20 >>> - if (ret < 0) >>> + if (STREQ_NULLABLE(klass, "GenericError") && >>> + STREQ_NULLABLE(desc, "guest hasn't updated any stats yet= ")) { >=20 > 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=3Dlibvirt.git;a=3Dblob;f=3Dsrc/qemu/qemu_monito= r_json.c;h=3Df8ab975695108f3585dfdd869f52b1996e737994;hb=3DHEAD#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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --seHBqjMNjL6OLtpdlFarWnSqfLF0OQaLd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTdawMAAoJEKeha0olJ0Nqt+UH/0JY5rw7yrJTdlqzGqV2oxem r8BAUmADB8WI6NWtROkw3ihWlghH2RW1a5iqcE7FgGTO4VAImsjQK1eOAE6CG7K6 0iho0pU3Q5d/xb3VnAT10k92Tw/3tqG0Y8rINvLHV50s5b6YpyPuS6I1nd3+2cAw u3lbLqw6sdZJSo71wCvWUWlcNCWAw+iyVAjl54sx1ujzpTWX2NsprAyC5YLxudiE fM5lrK+ZALPJYDHxRD3dr/ZlQSMIjuuoGE/0KyjiJUi4ujHbG6gSBneicBfLemqG KhLZz7uwow7mU/MAMp5A7tR319K6//BAwtKKcHvgbHMT7F5YNxkRav2kwJdX7nc= =/B00 -----END PGP SIGNATURE----- --seHBqjMNjL6OLtpdlFarWnSqfLF0OQaLd--