Hi,

On Sat, Oct 22, Willy Tarreau wrote:
> Another important point, when you say you restart every 2ms, are you
> certain you have a way to ensure that everything is completely started
> before you issue your signal to kill the old process ? I'm asking because
> thanks to the principle that the wrapper must stay in foreground (smart
> design choice from systemd), there's no way for a service manager to
> know whether all processes are fully started or not. With a normal init,
> when the process returns, all sub-processes have been created.

This is probably a bit off topic, but there's sd_notify call
(and [Service] Type=notify)
where service can notify systemd that it's done starting/reloading
configuration:
https://www.freedesktop.org/software/systemd/man/sd_notify.html

I don't know if systemd-wrapper would call:
sd_notify(0, "RELOADING=1");
... restart
sd_notify(0, "READY=1");
if this would prevent systemd from trying to do multiple reloads before
haproxy has finished starting.

-Jarno

-- 
Jarno Huuskonen

Reply via email to