[lxc-users] Ubuntu container upstart and graceful shutdown

Tamas Papp tompos at martos.bme.hu
Wed Mar 19 17:25:23 UTC 2014


On 03/19/2014 06:21 PM, Robin Monjo wrote:
> Hello,
>
> I'm using LXC 0.7.5 with the stock ubuntu template. My containers are
> running ruby processes that are managed by upstart (launched by
> upstart scripts). 
>
> I need these processes to be gracefully stopped when shutting down a
> container, i.e send the SIGTERM signal and wait for it to be done
> before fully shutting down my container.
>
> I see that inside a container, upstart listen for the SIPWR signal and
> execute "shutdown -h now "SIGPWR received"", is it safe to remove this
> in order to achieve my goal ? Or is there any other alternatives ?


If you send sigpwr, it stops services gracefully.
If you remove that, it doesn't.

So what do you want exactly? I may misunderstand something.

tamas


More information about the lxc-users mailing list