From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRLhO-0001sa-LA for qemu-devel@nongnu.org; Tue, 09 Sep 2014 09:43:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRLhI-0006gp-Bf for qemu-devel@nongnu.org; Tue, 09 Sep 2014 09:43:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRLhI-0006gf-0Y for qemu-devel@nongnu.org; Tue, 09 Sep 2014 09:43:04 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s89Dh3rg003135 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 9 Sep 2014 09:43:03 -0400 Date: Tue, 9 Sep 2014 09:42:59 -0400 From: Luiz Capitulino Message-ID: <20140909094259.156f0e51@redhat.com> In-Reply-To: <20140909132350.GJ4847@noname.str.redhat.com> References: <20140829160727.69f66ecd@redhat.com> <20140908104217.48f2354a@redhat.com> <20140908153318.GH4297@noname.redhat.com> <20140908125701.3be785e9@redhat.com> <20140909082733.GD4847@noname.str.redhat.com> <540EF48B.5090705@redhat.com> <20140909084353.454cc889@redhat.com> <540EF82E.60602@redhat.com> <20140909132350.GJ4847@noname.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block: extend BLOCK_IO_ERROR event with nospace indicator List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: fromani@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com On Tue, 9 Sep 2014 15:23:50 +0200 Kevin Wolf wrote: > Am 09.09.2014 um 14:53 hat Eric Blake geschrieben: > > On 09/09/2014 06:43 AM, Luiz Capitulino wrote: > > > > >> Enhancing query-block in addition to the event makes sense, if it is > > >> easy enough to do. At this point, we are talking about debugging aids, > > >> so as long as they are documented appropriately, I won't be too fussy. > > > > > > OK, but I'm wondering if we need to add the string field to both, > > > BLOCK_IO_ERROR and query-block, or only to one to the other. > > > > > > In my opinion, we should only add it to BLOCK_IO_ERROR if libvirt is > > > going to consume. Otherwise, it makes more sense to add it to query-block > > > because that's where we'll meet the user. > > > > > > Btw, by "consume" I mean read it and make it available to libvirt clients > > > so that they can print it to their users. If we don't want libvirt to > > > consume that field then I think we should only add it to query-block and > > > info block. > > > > [For those not aware, qemu built for downstream RHEL already has an > > error string in the __com.redhat_ namespace; we're trying to figure out > > what upstream should have so that downstream doesn't have to perpetually > > maintain an extension] > > > > Downstream libvirt does not currently consume any error string. With > > downstream qemu, the _only_ way to get the error string in the event is > > to parse libvirt logs, or use upstream libvirt with its backdoor of > > 'virsh qemu-monitor-event' (through the explicitly unsupported > > libvirt-qemu.so) to get at the raw event information. Changing libvirt > > to expose such an error string to the end user would require a new > > libvirt event number (the existing libvirt event is not extensible), so > > existing clients would not be able to get at the information without > > being recompiled to a new libvirt. > > > > Since the whole point of this field is for debugging, I think that it is > > sufficient to add it to JUST query-block, and not to the event. That > > is, if the app on top of libvirt gets an error, in the common case, they > > won't care about the message (it won't change how they act), and in the > > debug case, a developer trying to learn more about what happened can do > > their own query-block directly (via 'virsh qemu-monitor-command', also > > in libvirt-qemu.so) rather than trying to wire up libvirt to pass > > through an error string through a new event. > > You mention libvirt logs and I think that's an important point: If we > move it to query-block, will we still get a log entry so that we can > check this after the fact when only a log file is attached to a bug > report, but we don't have a running guest? Good point. I think this is call to have it in the event or both.