On Thu, 2017-02-09 at 15:53 +0000, Brett 11 wrote: > On Thu, 2017-02-09 at 11:32 +0300, Marat Khalili wrote: > > You are right, I was jumping to conclusions about "all sane > > distributions". Did you verify that lxc-stop shuts your container > > correctly? Because according to my quick google search they > > actually > > recommend to specify different signal in lxc.haltsignal for > > containers > > that don't understand SIGPWR from LXC. > > > > > > -- > > > > With Best Regards, > > Marat Khalili > > > > _______________________________________________ > > lxc-users mailing list > > lxc-users@lists.linuxcontainers.org > > http://lists.linuxcontainers.org/listinfo/lxc-users > > Thanks Marat! This is definitely interesting. I found a bug report > http > s://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831691 that says the > haltsignal has been changed to default as SIGRTMIN+3. However the > chain > of action to halt a container is pretty convoluted and this doesn't > appear changed on my up to date Debian Stretch. > > I do see 'lxc-stop' being executed when I 'systemctl stop l...@name.se > rv > ice' but your suggestion that 'lxc-stop' doesn't cleanly/gracefully > shutdown/halt containers leaves me worried. > > I guess for now I am going to try to replace SIGPWR in my container > '.service' file with the recommended SIGRTMIN+3. Do you think this > would be a proper solution? And thanks again for bringing this to my > attention. > > Brett > _______________________________________________ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users >
Just a quick update here. After changing the SIGPWR to SIGRTMIN+3 in my systemd service file seems to properly shut the container down. I'm still just a little confused why that is supposed to be the default but clearly isn't. Either way I hope this helps someone else, and although LXC is prctically my favorite thing about Linux and I thank the developers infinitely; maybe something can be changed to make containers a little easier to start and stop properly by default. Because if LXC by default pulls the proverbial power cable from your SQL server, people might not give it a fair chance.. Thanks, Brett _______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users