Re: How best to ensure s6-managed services are shut down cleanly?

2019-02-02 Thread Brett Neumeier
On Fri, Feb 1, 2019 at 1:46 PM Laurent Bercot wrote: > The question is, how does systemd decide to proceed with the rest of > the shutdown? If it's just waiting for s6-svscan to die, then it's > easy: don't allow s6-svscan to die before all your services are > properly shut down. That can be

Re: How best to ensure s6-managed services are shut down cleanly?

2019-02-01 Thread Jonathan de Boyne Pollard
Laurent Bercot: The question is, how does systemd decide to proceed with the rest of the shutdown? It waits for |s6-svscan| for up to 90s, putting the infamous cylon warrior and "A stop job is running for s6" message on the console. After 90s, it starts forcibly killing stuff, not

Re: How best to ensure s6-managed services are shut down cleanly?

2019-02-01 Thread Laurent Bercot
I _think_ that with my naive current setup, what actually happens is: - systemd sends a SIGTERM to s6-svscan; - s6-svscan sends a SIGTERM or SIGHUP to all s6-supervise processes, depending on what they are supervising, and then runs the finish program; - the s6-supervise for postgresql sends

How best to ensure s6-managed services are shut down cleanly?

2019-02-01 Thread Brett Neumeier
I use s6 to supervise userspace services like RabbitMQ and PostgreSQL. The s6-svscan process is launched and managed by systemd (because it's a CentOS 7 system). What I would like to do is ensure that PostgreSQL is shut down cleanly when the system is being powered down or rebooted. Because of the