[systemd-devel] sigpwr.target - intended usage?

Lennart Poettering lennart at poettering.net
Mon Jul 18 12:46:50 UTC 2016


On Mon, 18.07.16 14:00, Michael Biebl (mbiebl at gmail.com) wrote:

> 2016-07-18 13:54 GMT+02:00 Lennart Poettering <lennart at poettering.net>:
> > On Mon, 18.07.16 13:37, Michael Biebl (mbiebl at 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.

I'd really recommend them to switch to SIGRMIN+4 instead. Redefining
the meaning of SIGPWR like they are doing is certainly a bad idea.

Note that this is even documented here since a long time:

https://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/

My recommendation would be for the LXC folks to actually have a look
at this document. All of what this lists is container manager agnostic
and should be pretty common sense, and fully implemented by
systemd. If they adopt this they wouldn't have to alter systemd's
default install at all anymore, and things would just work for them in
a container... And most importantly: any container image prepared from
any distribution that uses systemd would just work...

I mean, there's a reason why I put that doc together: to make it easy
for containre managers to "just work" with systemd. 

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list