]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
tools/libxl: improve logging on domain create failure.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 26 Jan 2016 14:38:46 +0000 (14:38 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 3 Feb 2016 11:24:19 +0000 (11:24 +0000)
commit164bc9aecc94922f87bf0f740e2ce1b0af35cb29
tree5366af9b60aa242e3a9e90e58e1468b18bf9e7bf
parent7db1f6a67da2ba4997ad2079f0c652b3a18fd9d5
tools/libxl: improve logging on domain create failure.

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 <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Cc: suse.dev@fea.st
tools/libxl/libxl_create.c