[lxc-devel] Shutting down containers properly
Christian Seiler
christian at iwakd.de
Fri May 25 15:24:07 UTC 2012
Hi,
> Have you looked at the lxc-shutdown script we have in Ubuntu and the
> integration we have with upstart?
No, not yet, but I'll look at it later.
> lxc-shutdown sends two different signals:
> reboot => SIGINT
> shutdown => SIGPWR
>
> These are caught by upstart and will trigger a clean reboot or
> shutdown
> of the container. It's what happens on shutdown of the host in 12.04
> LTS.
On a Debian container I had lying around here it had no effect
whatsoever, because there's nothing in the /etc/inittab catching it.
Is it document behaviour that upstart shuts down on SIGPWR? (upstart
has no /etc/inittab where this may be configured, right?) Because if it
is that easy to cause upstart deterministically to shut down, then that
is definitely something we should use.
Still, I think my initial rationale still holds that lxc-stop should
shut down by default, because I certainly didn't expect lxc-stop to kill
everything with SIGKILL when I tried it for the first time. So basically
all I'm saying is that Ubuntu's lxc-shutdown logic should be implemented
in lxc-stop and that it should be a bit more generic with the
possibility that the user can configure different methods in the config
file.
Regards,
Christian
More information about the lxc-devel
mailing list