Your message dated Wed, 30 Aug 2023 17:52:29 +0200
with message-id <ZO9lvSswapY/[email protected]>
and subject line Re: lxc: Confusion about default log output
has caused the Debian Bug report #806699,
regarding lxc: Confusion about default log output
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
806699: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806699
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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 libc6 2.19-3
ii libcap2 1:2.22-1.2
ii libseccomp2 2.1.1-1
ii libselinux1 2.3-2
ii multiarch-support 2.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 rsync 3.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
--- End Message ---
--- Begin Message ---
Hi Mathias,
> I sorry that no one ever responded to your bug. I did confirm today
> that the documentation and behavior of lxc seems unchanged from your
> initial report.
Thanks for your followup. I considered opening up an upstream issue
about this, but it seems that the incorrect --help output was actually
fixed upstream:
https://github.com/lxc/lxc/blob/719c0ed12cdcc080ccc2932a4afbb97b514f3960/src/lxc/tools/lxc_start.c#L66
It seems the manpage now matches the --help output, and does not specify
the default logfile, which I guess is ok:
https://github.com/lxc/lxc/blob/719c0ed12cdcc080ccc2932a4afbb97b514f3960/doc/lxc-start.sgml.in#L167-L171
The lxc.container.conf manpage does specify the default filename as
before:
https://github.com/lxc/lxc/blob/719c0ed12cdcc080ccc2932a4afbb97b514f3960/doc/lxc.container.conf.sgml.in#L2844-L2848
It seems the fix is already present in Debian (since oldstable - I see
it in version 1:4.0.6-2+deb11u2 already).
So let's close this, nothing left to do AFAICS.
I haven't looked up the first version that has the fix, so I'm omitting
the Version header from this closing message.
Gr.
Matthijs
signature.asc
Description: PGP signature
--- End Message ---