Received: from eggs.gnu.org ([2001:4830:134:3::10]:46354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFPf4-0006N7-Go for qemu-devel@nongnu.org; Thu, 07 Aug 2014 11:31:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFPew-0008GH-Ff for qemu-devel@nongnu.org; Thu, 07 Aug 2014 11:31:26 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:46345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFPew-0008Ew-6v for qemu-devel@nongnu.org; Thu, 07 Aug 2014 11:31:18 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Aug 2014 16:31:15 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 3A5C61B0805F for ; Thu, 7 Aug 2014 16:32:03 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s77FVDH923658688 for ; Thu, 7 Aug 2014 15:31:13 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s77FVCWT030414 for ; Thu, 7 Aug 2014 09:31:12 -0600 Date: Thu, 7 Aug 2014 17:31:11 +0200 From: Cornelia Huck Message-ID: <20140807173111.37d4f643.cornelia.huck@de.ibm.com> In-Reply-To: <20140807143901.GF3374@noname.redhat.com> References: <1406290248-11545-1-git-send-email-cornelia.huck@de.ibm.com> <20140807143901.GF3374@noname.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 0/3] dataplane: dataplane: more graceful error handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, Stefan Hajnoczi On Thu, 7 Aug 2014 16:39:01 +0200 Kevin Wolf wrote: > Am 25.07.2014 um 14:10 hat Cornelia Huck geschrieben: > > Currently, qemu will take a hard exit if it fails to set up guest or > > host notifiers, giving no real clue as to what went wrong (e.g., when > > out of file descriptors). > > > > This patchset tries to make this more manageable: Both by improving the > > error message and by gracefully falling back to non-dataplane in case of > > errors. > > > > Patches are also available on > > > > git://github.com/cohuck/qemu dataplane-graceful-fail > > > > Thoughts? > > I think Stefan should comment on this, but I certainly welcome every > patch that fixes an exit(1) call. > > I'm not entirely sure about the added fprintf(). It feels wrong, but of > course it's a lot less wrong than exiting. Well, I was only enhancing an existing message :) At least the admin has a chance to find out now what went wrong. > Ideally already adding the > device with dataplane enabled would fail so that we can return a proper > QMP error message instead of just dumping something on stderr. Not sure > if it's possible, though, I don't really know that code. The problem is that we won't fail until after we actually try to start dataplane (i.e. when the guest is trying to use the device). Depending on the guest, this may be when the guest has already been running for a time (e.g. when the guest disables using some devices and the guest admin enables them manually later). > > Nothing to stop this series anyway. > > Kevin >