<div dir="ltr">Thank you Serge, that is the thing I was looking for ! Every time great support on this mailling list !</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-19 19:14 GMT+01:00 Serge Hallyn <span dir="ltr"><<a href="mailto:serge.hallyn@ubuntu.com" target="_blank">serge.hallyn@ubuntu.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">Quoting Michael H. Warfield (mhw@WittsEnd.com):<br>
> On Wed, 2014-03-19 at 18:21 +0100, Robin Monjo wrote:<br>
> > Hello,<br>
> ><br>
> ><br>
> > I'm using LXC 0.7.5 with the stock ubuntu template. My containers are<br>
> > running ruby processes that are managed by upstart (launched by<br>
> > upstart scripts).<br>
> ><br>
> ><br>
> > I need these processes to be gracefully stopped when shutting down a<br>
> > container, i.e send the SIGTERM signal and wait for it to be done<br>
> > before fully shutting down my container.<br>
> ><br>
> ><br>
> > I see that inside a container, upstart listen for the SIPWR signal and<br>
> > execute "shutdown -h now "SIGPWR received"", is it safe to remove this<br>
> > in order to achieve my goal ? Or is there any other alternatives ?<br>
><br>
> Ok... So, why not use a SIGPWR? That's the convention. Are you<br>
> married to using SIGTERM for this purpose? I'm just getting ready to<br>
> make sure the Fedora and CentOS templates adhere to the SIGPWR<br>
> convention for both Upstart and Systemd. Why SIGTERM now?<br>
><br>
> And the simple answer to your question is "no, it is not safe - it will<br>
> cause other timeouts, delays, and problems".<br>
<br>
</div>Since you're using upstart, why not just put<br>
<br>
stop on starting rc RUNLEVEL=[016]<br>
<br>
in the upstart job?<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br>
</div></div></blockquote></div><br></div>