From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxM7D-00024d-Te for qemu-devel@nongnu.org; Fri, 03 Aug 2012 13:56:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxM7C-0000OE-IR for qemu-devel@nongnu.org; Fri, 03 Aug 2012 13:56:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxM7C-0000NJ-AJ for qemu-devel@nongnu.org; Fri, 03 Aug 2012 13:56:46 -0400 Message-ID: <501C10CD.10402@redhat.com> Date: Fri, 03 Aug 2012 11:56:29 -0600 From: Eric Blake MIME-Version: 1.0 References: <1343869374-23417-1-git-send-email-lcapitulino@redhat.com> <1343869374-23417-31-git-send-email-lcapitulino@redhat.com> <20120803174433.GB16157@illuin> In-Reply-To: <20120803174433.GB16157@illuin> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigC3456AF0FC22C0B32F05FA17" Subject: Re: [Qemu-devel] [PATCH 30/34] qemu-ga: switch to the new error format on the wire List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: kwolf@redhat.com, aliguori@us.ibm.com, armbru@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com, Luiz Capitulino This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC3456AF0FC22C0B32F05FA17 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 08/03/2012 11:44 AM, Michael Roth wrote: > On Wed, Aug 01, 2012 at 10:02:50PM -0300, Luiz Capitulino wrote: >> IMPORTANT: this BREAKS qemu-ga compatibility for the error response. >> >> Instead of returning something like: >> >> { "error": { "class": "InvalidParameterValue", >> "data": {"name": "mode", "expected": "halt|powerdown|rebo= ot" } } } >> >> qemu-ga now returns: >> >> { "error": { "class": "GenericError", >> "desc": "Parameter 'mode' expects halt|powerdown|reboot"= } } >=20 >> >> Notice that this is also a bug fix, as qemu-ga wasn't returning the >> human message. >> >> Signed-off-by: Luiz Capitulino >=20 > So, if the libvirt folks are okay with it: The only use libvirt made of existing qemu-ga errors was to stringify them in order to pass on an error message to the user when a command failed. Existing libvirt attempts to look up the 'desc' field, and when it is lacking, then attempts to stringify the 'class' field based on a finite list of known classes. Qemu is now shrinking the list of known classes but providing a 'desc' field, so the error message quality in libvirt will actually improve. After reading libvirt's src/qemu/qemu_agent.c, I don't see any problem with this patch from libvirt's point of view. Reviewed-by: Eric Blake --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigC3456AF0FC22C0B32F05FA17 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.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQHBDPAAoJEKeha0olJ0Nq454IAKqyqULuNej6Xk8xVyAmG2U+ tyYLUcOhEUHzNSOWk9VnPtLOB+8t8lahpocaxou+rUdmHy4Tg3+uvlVw3EvkBEa7 pHHCL1g2WWKxy94+pKcWGY2/sMlmM+07ObUFr4926JvZ3tX5I+90nNeElfWUgS+Q nr2QDMR8SGCyUp1V4MfW56C8qSI29t1oLtQefaCVVILVtuwuMfBsVGmCS7WHnaoZ A606n0FUl8DPZlFo7r6zoL/+/+nWnalDlFI7DoAmBhR/NTkEPir75kgWL07hM55K 7GMkAXwCW6N75D0gSCPMu1Qo30Q+xiDYGAqNscYP/6ziiqiP7TOMHMIFseplSOM= =PUyB -----END PGP SIGNATURE----- --------------enigC3456AF0FC22C0B32F05FA17--