Thomas Lamprecht
9a1330c72e
rest: daemon: comment why using a systemd barrier is important for main PID handover
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-02 11:44:20 +02:00
Dominik Csapak
0a6df20986
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>
2021-10-02 11:44:20 +02:00
Wolfgang Bumiller
8735247f29
drop fd_change_cloexec from proxmox-rest-server
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-09-30 12:43:22 +02:00
Dietmar Maurer
e64f77b716
cleanup: move use clause to top
2021-09-30 08:42:37 +02:00
Dietmar Maurer
11148dce43
proxmox-rtest-server: make Reloader and Reloadable private
2021-09-30 07:44:19 +02:00
Dietmar Maurer
38da8ca1bc
proxmox-rest-server: improve logging
...
And rename server_state_init() into catch_shutdown_and_reload_signals().
2021-09-29 14:48:46 +02:00
Dietmar Maurer
a0ffd4a413
proxmox-rest-server: avoid useless call to request_shutdown
...
Also avoid unsafe code.
2021-09-29 14:37:07 +02:00
Dietmar Maurer
d265420025
daemon: simlify code (make it easier to use)
2021-09-29 12:04:48 +02:00
Dietmar Maurer
8cf445ecc4
cleanup: make BoxedStoreFunc private
...
There is no need to export this type.
2021-09-29 09:55:43 +02:00
Dietmar Maurer
53daae8e89
proxmox-rest-server: cleanup formatter, improve docs
...
Use trait for OutputFormatter. This is functionally equivalent,
but more rust-like...
2021-09-28 07:45:50 +02:00
Dietmar Maurer
8bca935f08
move src/tools/daemon.rs to proxmox-rest-server workspace
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00