Package: lxc
Version: 1:1.0.6-6+deb8u1
Severity: normal
Dear Maintainer,
while debugging an lxc problem, I was surprised by the lack of any log
output from lxc-start, which turned out to end up in a logfile. This
report is against the stable version of lxc, since I can't easily test
the unstable, or upstream 1.1.x version, hopefully it is easy for you to
do so. Also, I'm not sure if this is an upstream problem, or a problem
caused by Debian's build options, so I'll report it here and let you
forward it upstream if appropriate.
Anyway, the problem is that I expected log output to appear on stderr
when running lxc-start, based on the lxc-start -h output:
-o, --logfile=FILE Output log to FILE instead of stderr
While writing this report, I checked the lxc-start manpage, which shows
something different:
-o, --logfile=FILE
Output to an alternate log FILE. The default is no log.
The lxc.container.conf manpage has yet another view:
Logging can be configured on a per-container basis. By default,
depending upon how the lxc package was compiled, container startup is
logged only at the ERROR level, and logged to a file named after the
container (with '.log' appended) either under the container path, or
under /var/lib/lxc.
It seems the latter was correct, since I found that output ended up at
/etc/lxc/container_name/container_name.log (note that /var/lib/lxc links
to /etc/lxc, so I'm not sure which path was used exactly).
To reproduce, create an empty "/etc/lxc/test/config" file and run:
# lxc-start -n test -l INFO
This will obviously fail, and error messages are shown on stderr as
expected. However, the request INFO messages are only written to
/etc/lxc/test/test.log.
Gr.
Matthijs
-- System Information:
Debian Release: 7.5
APT prefers stable
APT policy: (990, 'stable'), (700, 'unstable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lxc depends on:
ii init-system-helpers 1.22
ii libapparmor1 2.7.103-4
ii libc62.19-3
ii libcap2 1:2.22-1.2
ii libseccomp2 2.1.1-1
ii libselinux1 2.3-2
ii multiarch-support2.13-38+deb7u8
ii python3 3.4.1-1
Versions of packages lxc recommends:
ii debootstrap 1.0.48+deb7u1
ii openssl 1.0.1e-2+deb7u16
ii rsync3.0.9-4
Versions of packages lxc suggests:
ii lua5.2 5.2.1-3+deb7u1
-- debconf information:
lxc/auto: true
lxc/shutdown: /usr/bin/lxc-halt
lxc/title:
* lxc/directory: /etc/lxc