From: Ian Campbell Subject: Re: libxl error reporting Date: Tue, 11 Mar 2014 09:58:32 +0000 Message-ID: <1394531912.18366.6.camel@kazak.uk.xensource.com> References: <20140306081107.GA12445@aepfle.de> <21272.26118.659524.442488@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21272.26118.659524.442488@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Olaf Hering , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2014-03-06 at 12:11 +0000, Ian Jackson wrote: > Olaf Hering writes ("libxl error reporting"): > > For example "virsh migrate" calls libxl_domain_suspend, which has many > > ways to fail. What details about the specific error should be returned > > to the caller? Right now its just some sort of libxl_error. All virsh > > could do is to show "please see logfile for details". > > Unfortunately, yes. libvirt could also provide its own xtllog implementation which could store and provide the log messages in a "virsh friendly" manner (whatever that might be) as well as logging (if it wants). > > I think this specifc function should return some sort of state, which is > > preserved within the function call. It could be something like "remote > > side had issues", "guest was too busy", "guest lacks PV drivers", "some > > unexpected (internal) error". > > > > Unfortunately libxl.h contains nothing about error handling. > > I have been considering a campaign of adding (many) more error codes. Good idea. Ian.