From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuUsp-0001Jc-DO for qemu-devel@nongnu.org; Thu, 26 Jul 2012 16:42:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuUsk-0008Lu-Uy for qemu-devel@nongnu.org; Thu, 26 Jul 2012 16:42:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuUsk-0008Lc-Mw for qemu-devel@nongnu.org; Thu, 26 Jul 2012 16:42:02 -0400 Message-ID: <5011AB96.7070405@redhat.com> Date: Thu, 26 Jul 2012 14:41:58 -0600 From: Eric Blake MIME-Version: 1.0 References: <87ipdacrhj.fsf@codemonkey.ws> In-Reply-To: <87ipdacrhj.fsf@codemonkey.ws> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig4FED2432738BEF20FABFA53A" Subject: Re: [Qemu-devel] Plan for error handling in QMP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: Kevin Wolf , Paolo Bonzini , Luiz Capitulino , qemu-devel@nongnu.org, Markus Armbruster This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4FED2432738BEF20FABFA53A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 07/26/2012 12:22 PM, anthony@codemonkey.ws wrote: >=20 > Hi, >=20 > We had a violent^Wheated discussion on IRC about how to move forward > with Luiz's proposed error series. I think we reached consensus. This= > note attempts to outline that. >=20 > Principles > ---------- > 1. Errors should be free formed strings with a class code >=20 > 2. There should be a small number of class codes (10-15) added > strictly when there are specific users of a code. >=20 > 3. The class code should be expressed as an enum data type in the norma= l > QMP schema. Other than this, errors should have no structure in the= > schema.[*] >=20 > 4. We should drop all dictionary arguments in the current error > mechanisms beyond 'class' and 'desc'. >=20 > 5. The following errors are used by libvirt: > - CommandNotFound: QMP parsing > - DeviceNotActive/KVMMissingCap: ballooning > - DeviceNotFound: drive_del > - MigrationExpected: cont DeviceInUse, NotSupported: block-stream Search for qemuMonitorJSONHasError in src/qemu/qemu_monitor_json.c >=20 > 6. We need to make sure that these errors are preserved while other > errors should be consolidated. > - We need to state very clear for 1.2 which errors are going away. >=20 > 7. We need to make sure that anything we expose in 1.2 stays that way. > If we're dropping 'InvalidParameterType' as a class code, it should = be > dropped in 1.2. This could be achieved by making all existing codes= > except for those in (5) report 'UnknownError' or something.[*] >=20 > [*] I took a little bit of license with these. Hopefully it's not > controversial. >=20 > Regards, >=20 > Anthony Liguori > =20 >=20 >=20 --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig4FED2432738BEF20FABFA53A 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/ iQEcBAEBCAAGBQJQEauXAAoJEKeha0olJ0NqCBwIAIBpuZPLWrplCreeGUlwYTZY v13jNWsKCUfJamJkVDaE7+bsomuRpDxe1FA977gNyZn0zAGhrLeDHtmd8VOYLrN4 k89hUemaENbu+m7sfn/A6eNN0lr6XXQDP9YleqZihf5TAXcAPYJJFJGNOLyntIxo H80BEvefSbJLnpjiVG5zddVzCUL9Yuxz9Qe8VmKEOe+8ojW4KiJfLvFDjY0FXgc6 kke2DphJLz+ThbvP4RbaAfrC9ZlAtUGGfgOrui803gCddnLwqO8TLET5qKYbgg3S j2wDg8e24ul0KsqY7lEh4aZKjTlTBeoDsvK4sBs8BAuq9irVEaMRR2o/j5wY9IY= =zuvp -----END PGP SIGNATURE----- --------------enig4FED2432738BEF20FABFA53A--