[lxc-users] Better error logging when starting containers?

Akshay Karle akshay.a.karle at gmail.com
Sun Feb 21 23:50:53 UTC 2016


Hello lxc users,

After having used lxc for a while now, I've realized that when the
container fails to start, it fails with a very generic message as follows:

$ lxc-start -n test
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 346 To get more details, run the container in
foreground mode.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by
setting the --logfile and --logpriority options.

And if you are using ephemeral containers, the error is even more generic
and with no way to increase the log level:

$ lxc-start-ephemeral -n e1 -o test -d
setting rootfs to .%s. /home/vagrant/.local/share/lxc/e1/rootfs
The container 'e1' failed to start.

I was wondering if someone felt the need of having a little more meaningful
error messages giving a summary of the error in the console output. The
container logfile does have way more descriptive error messages, but since
you don't directly have the errors in the console output, you are forced to
open the logfiles everytime something goes wrong. Instead if you had an
output that just included a few important error lines from the logfile such
as the following example:

$ lxc-start -n test
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc_start - start.c:lxc_spawn:1031 - failed creating cgroups
lxc-start: lxc_start.c: main: 346 To get more details, run the container in
foreground mode.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by
setting the --logfile and --logpriority options.

Do you think this would help? Although I have no idea if this is simple to
implement, I just wanted to get your ideas, suggestions and concerns (if
any) before attempting to figure out a solution.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160221/518879fa/attachment.html>


More information about the lxc-users mailing list