Hi Willy,

On 11:26 Thu 09 Oct     , Willy Tarreau wrote:
> Hi Apollon,
> 
> On Wed, Oct 08, 2014 at 03:14:41PM +0300, Apollon Oikonomopoulos wrote:
> > By default systemd will send SIGTERM to all processes in the service's
> > control group. In our case, this includes the wrapper, the master
> > process and all worker processes.
> > 
> > Since commit c54bdd2a the wrapper actually catches SIGTERM and survives
> > to see the master process getting killed by systemd and regard this as
> > an error, placing the unit in a failed state during "systemctl stop".
> 
> Then shouldn't we fix this by letting the wrapper die after receiving the
> SIGTERM ? Otherwise I'm happy to merge your patch, but I'd rather ensure
> that we don't encounter yet another issue.

The wrapper does exit on its own when the haproxy "master" process 
exits, which is done as soon as all "worker" processes exit. The problem 
is that the wrapper wants to control all worker processes on its own, 
while systemd second-guesses it by delivering SIGTERM to all processes 
by default.

> 
> I'm really amazed by the amount of breakage these new service managers are
> causing to a simple process management that has been working well for over
> 40 years of UNIX existence now, and the difficulty we have to work around
> this whole mess!

I guess every new system has its difficulties and learning curve, 
especially when it breaks implicit assumptions that hold for a long 
time.

Cheers,
Apollon

Reply via email to