Hi

On 4/4/24 14:35, William Lallemand wrote:
I'm not against merging this, but I don't see any change comparing to the
current model?


I mainly stumbled upon this new mode in the documentation while looking into replacing libsystemd, where you beat me to it :-)

My understanding is that it improves the situation insofar that systemd knows that the reload (attempt) is not yet finished even if the kill command exits.

Currently it's the following:

- systemd executes the kill.
- kill exists.
- systemd believes the reload finished.
- HAProxy sees the signal, sends RELOADING=1.
- systemd believes a second reload started.
- HAProxy finishes reloading, sends READY=1.
- systemd believes the second reload finished.

With the new mode it's:

- systemd sends the signal.
- systemd waits for RELOADING=1.
- HAProxy sees the signal, sends RELOADING=1.
- HAProxy finishes reloading, sends READY=1.
- systemd believes the reload finished.

The new mode is only available with very recent systemd versions, but we can future-proof the implementation by already including the MONOTONIC_USEC field in the message. Unknown fields are explicitly ignored by systemd, thus this patch makes the situation no worse.

Best regards
Tim Düsterhus

Reply via email to