Received: from eggs.gnu.org ([2001:4830:134:3::10]:39391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBOMD-0001gs-CO for qemu-devel@nongnu.org; Wed, 14 Jan 2015 08:51:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBOMA-00067t-6o for qemu-devel@nongnu.org; Wed, 14 Jan 2015 08:51:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBOM9-00067J-UB for qemu-devel@nongnu.org; Wed, 14 Jan 2015 08:51:34 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0EDpWfq000447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 14 Jan 2015 08:51:33 -0500 From: Markus Armbruster References: <1421171432-8733-1-git-send-email-armbru@redhat.com> <1421171432-8733-3-git-send-email-armbru@redhat.com> <54B66C1B.6090401@redhat.com> Date: Wed, 14 Jan 2015 14:51:29 +0100 In-Reply-To: <54B66C1B.6090401@redhat.com> (Eric Blake's message of "Wed, 14 Jan 2015 06:16:11 -0700") Message-ID: <87h9vtfp26.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 2/9] qmp hmp: Improve error messages when SPICE is not in use List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: lcapitulino@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com Eric Blake writes: > On 01/13/2015 10:50 AM, Markus Armbruster wrote: >> Commit 7572150 adopted QERR_DEVICE_NOT_ACTIVE for the purpose, >> probably because adding another error seemed cumbersome overkill. >> Produces "No spice device has been activated", which is awkward. >> >> We've since abandoned our quest for "rich" error objects. Time to >> undo the damage to this error message. Replace it by "SPICE is not in >> use". >> >> Keep the stupid DeviceNotActive ErrorClass for compatibility, even >> though Libvirt doesn't use it. > > Libvirt has a few places that look explicitly for "DeviceNotActive" when > deciding how to handle failure reporting; I didn't audit closely enough > to see if it actually changes behavior if the class were to disappear. I studied libvirt's use of error classes other than GenericError before my Christmas break. My findings: * CommandNotFound: used; libvirt could perhaps rely on query-commands instead * DeviceEncrypted: not used (surprise, surprise) * DeviceNotActive: used with balloon and block jobs, not used with spice * DeviceNotFound: used to detect active commit support, with device-list-properties and with qom-list (which isn't about devices at all) * KVMMissingCap: used; occurs only with balloon, and it shandled just like DeviceNotActive > Your approach in this patch is safest, at any rate. I'm resigned to keeping these error classes around. I'm still fighting their proliferation to new code. >> Signed-off-by: Markus Armbruster >> --- >> include/ui/qemu-spice.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) > > Reviewed-by: Eric Blake Thanks!