]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mworker: reintroduce systemd support
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Fri, 11 Oct 2024 17:36:32 +0000 (19:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Oct 2024 20:02:39 +0000 (22:02 +0200)
commit4c8303a59e8cd75a50f293e2bd6e2c3c4db2eda4
treeaa799ebf9cc098ada73c60db85d7addf66bc78bc
parent9e23cfa5c29d880f9cdbef0d795565cb44726935
MINOR: mworker: reintroduce systemd support

Let's reintroduce systemd support in the refactored master-worker mode.

As for now, the master-worker fork happens during early initialization steps and
then the master process receieves the "READY" status message from the newly
forked worker, that has successfully loaded. Let's propagate this "READY" status
message at this moment to the systemd from the master process context
(_send_status()). We use the master process to send messages to systemd,
because it is only the process, monitored by systemd.

In master recovery mode, we also need to send to the systemd the "READY"
message, but with the status "Reload failed". "READY" will signal to systemd,
that master process is still alive, because it doesn't exit in recovery mode
and it keeps the existed worker. Status "Reload failed" will signal to user,
that something wrong has happened with the configuration. Same message logic
was originally preserved for the case, when the worker fails to read its
configuration, see on_new_child_failure() for more details.
src/cli.c
src/haproxy.c