Dear William-san,

Sorry for the late reply.

> I'm not convince that it should be done within HAProxy, you will still
> have the same problem if the master crashes.

I understand that it is the same when the master crashes.
The remaining pid file is unavoidable,
but I think it is necessary to check if the PID written in the pidfile is the 
haproxy's PID.
Otherwise, the -sf/-st option could kill other processes.

I will send a patch to solve this problem.

Best regards,
MIZUTA Takeshi

> -----Original Message-----
> From: William Lallemand <[email protected]>
> Sent: Tuesday, October 13, 2020 5:42 PM
> To: Mizuta, Takeshi <[email protected]>
> Cc: 'HAProxy' <[email protected]>
> Subject: Re: [PATCH] BUG/MINOR: mworker: delete the pidfile when the
> master process is stopped
> 
> On Thu, Oct 08, 2020 at 04:59:46AM +0000, [email protected]
> wrote:
> > Hi, all,
> >
> > haproxy does not delete the pidfile when stopped.
> > If the PID in the remaining pidfile is reused by other process,
> > the operation using the pidfile may affect other process.
> > In master-worker mode, fixed to delete pidfile when stopped.
> >
> > However, in the daemon mode, it has not been dealt with yet.
> > Is there any objection to dealing only with master-worker mode?
> >
> > Best regards,
> > MIZUTA Takeshi
> 
> 
> Hello,
> 
> I'm not convince that it should be done within HAProxy, you will still
> have the same problem if the master crashes.
> 
> It's also a big change of behavior that could break existing scripts.
> 
> In my opinion this should be done this in your init script.
> 
> --
> William Lallemand

Reply via email to