From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH] tools/libxl: improve logging on domain create failure. Date: Thu, 28 Jan 2016 10:52:33 +0000 Message-ID: <20160128105233.GL25660@citrix.com> References: <1453819126-10218-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1453819126-10218-1-git-send-email-ian.campbell@citrix.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 Campbell Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com, suse.dev@fea.st, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, Jan 26, 2016 at 02:38:46PM +0000, Ian Campbell wrote: > A user reported[0] that xl create failed with just: > libxl: error: libxl_create.c:892:initiate_domain_create: Unable to set domain build info defaults > and some resulting fallout, but without indicating why it was unable > to set the defaults, even in verbose mode[1]. > > Go through libxl__domain_{create,build}_info_setdefault and ensure > that each error path logs something. > > In most cases this involved simply adding a call to LOG. > > In two cases this involved switching from strdup to > libxl__strdup(NOGC) and removing the existing error handling. > > When switching from qemu-xen to qemu-xen-traditional (because the > former is not available) log at level INFO rather than VERBOSE, so > the message would normally be printed. Also tweak the language here. > > I'm not sure all these messages are reachable (some might be shadowed > by previous error paths) but it seems better to err on the side of > caution. > > [0] http://lists.xen.org/archives/html/xen-users/2016-01/msg00125.html > [1] http://lists.xen.org/archives/html/xen-users/2016-01/msg00129.html > > Signed-off-by: Ian Campbell > Cc: suse.dev@fea.st Acked-by: Wei Liu