rest-server/daemon: use sd_notify_barrier for service reloading

until now, we manually polled the systemd service state during a reload
so that the sd_notify messages get processed in the correct order
(RELOAD(old) -> MAINPID(old) -> READY(new))

with systemd >= 246 there is now 'sd_notify_barrier' which
blocks until systemd processed all prior messages

with that change, the daemon does not need to know the service name anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dominik Csapak
2021-09-30 09:18:58 +02:00
committed by Thomas Lamprecht
parent 6680878b5c
commit 0a6df20986
5 changed files with 22 additions and 44 deletions

2
debian/control vendored
View File

@ -89,7 +89,7 @@ Build-Depends: debhelper (>= 12),
librust-zstd-0.6+default-dev,
libacl1-dev,
libfuse3-dev,
libsystemd-dev,
libsystemd-dev (>= 246-~~),
uuid-dev,
libsgutils2-dev,
bash-completion,