On Thu, Oct 09, 2014 at 12:35:10PM +0300, Apollon Oikonomopoulos wrote:
> 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.

OK, so I'm merging your patch if you think it's the best solution.

> > 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.

Well, we're far away from the learning curve, we're writing a wrapper
to help a stupid service manager handle daemons, because the people who
wrote it did not know that in the unix world, there were some services
running in background. "ps aux" could have educated them by discovering
that there were other processes than "ps" and their shell :-/

Thanks,
Willy


Reply via email to