On Mon, 18.07.16 14:41, Michael Biebl (mbi...@gmail.com) wrote: > 2016-07-18 14:00 GMT+02:00 Michael Biebl <mbi...@gmail.com>: > > 2016-07-18 13:54 GMT+02:00 Lennart Poettering <lenn...@poettering.net>: > >> On Mon, 18.07.16 13:37, Michael Biebl (mbi...@gmail.com) wrote: > >> > >>> Apparently SIGPWR is used by lxc-stop to shut down LXC containers. > >>> What interface would you recommend instead? > >>> > >>> https://lists.linuxcontainers.org/pipermail/lxc-users/2015-May/009279.html > >> > >> Is that actually really used? I mean, upstart is pretty much dead > >> afaics... > >> > >> systemd since day one shuts down cleanly on SIGRTMIN+4, and it's > >> probably what a container manager should use (it is what machined > >> uses). See the "Signals" section in systemd(1). > > > > lxc containers require sigpwr.target to be hooked up properly, > > otherwise lxc-stop does not shutdown the container. > > SIGPWR is wired up in sysvinit and upstart by default to initiate a > shutdown. Afaics both do not react on SIGRTMIN+4.
Well, many sysvinit distros where set up to log something about "IMPENDING POWER FAILURE" on SIGPWR... It sounds really wrong to trigger this in a container just to shut it down... > So the problem here is that lxc doesn't know what runs inside the > container: could be an older version of Debian (using syvinit), and > older version of Ubuntu (using upstart) or systemd. Well, if they don't want to make SIGRTMIN+4 the default because they think sysvinit/Upstart is more relevant than systemd, then that's their right. But I think making the kill signal configurable per container would probably be a good idea. That's what we do in nspawn, where SIGRTMIN+3 is the default, but you can override it with --kill-signal= on the cmdline (or KillSignal= in .nspawn files), for compat with sysv. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel