On Tue, Jan 08, 2019 at 02:03:22PM +0100, Tim Düsterhus wrote:
> Emmanuel,
> 
> Am 08.01.19 um 13:53 schrieb Emmanuel Hocdet:
> > Without master/worker, haproxy reload work with an active waiting (haproxy 
> > exec).
> > With master/worker, kill -USR2 return immediately: Is there a way to know 
> > when the reload is finished?
> > 
> 
> Are you using systemd with -Ws? haproxy informs systemd when a reload
> starts and when it is finished using the sd_notify protocol:
> 
> https://www.freedesktop.org/software/systemd/man/sd_notify.html#RELOADING=1
> 
> Best regards
> Tim Düsterhus
> 

Hi guys,

Indeed you can't do that without systemd, haproxy send a READY=1 variable with
sd_notify once the processes are ready.

Unfortunately sd_notify has some limitation, there is no sd_notify variable
which permits to notify that a reload failed, but you could read the errors in
the service logs.

I have some plans for the master worker in the future, to have a synchronous
state of the reload on the CLI, but this is not possible with the current
architecture. We will probably need to stop reexecuting the process to achieve
that and do a reload over the master CLI with a return code.

-- 
William Lallemand

Reply via email to