Bug#831691: Please use lxc.haltsignal = SIGRTMIN+3 for systemd containers
Michael Biebl
biebl at debian.org
Mon Jul 18 15:16:10 BST 2016
Package: lxc
Version: 1:2.0.3-1
Severity: normal
Hi,
he had an interesting discussion today on #pkg-systemd IRC about what
modifications are currently done for LXC containers to work properly
with systemd. Ideally we'd like to make a default systemd installation work
ootb.
Atm, the Debian template hooks up
/etc/systemd/system/sigpwr.target -> /lib/systemd/system/halt.target.
At some point, Martin added a workaround to the systemd package [1].
Systemd upstream is pretty clear though, that (mis)using SIGPWR to
initiate an ordered shutdown is not the preferred way under systemd [2].
If the container manager sends SIGRTMIN+3 to the init process following
the container spec [3], then systemd will shut down nicely.
I therefor suggest, that lxc should use haltsignal = SIGRTMIN+3 for
systemd based containers.
I would set that in the container config file during lxc-create if the
template is for a systemd-based distro.
Regards,
Michael
[1] https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?id=44c3369f9
[2] https://lists.freedesktop.org/archives/systemd-devel/2016-July/037166.html
[3] https://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/
-- System Information:
Debian Release: stretch/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
More information about the Pkg-systemd-maintainers
mailing list