-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
5.0.35
-
None
-
Product delivery backlog
The issue described in https://support.zabbix.com/browse/ZBX-15602 persists
Debian 11, zabbix-proxy-pgsql_5.0.35
I suppose zabbix-server suffers from the same issue
Steps to reproduce:
- Stop postgresql.service
- Shutdown/reboot host
Result:
Notice how host will hang on stopping zabbix proxy (no limit)
Expected:
Zabbix proxy should not prevent host from shutting down/restarting, within a sensible time period
Aside from the mysterious reason to have TimeoutSec=Infinity, there only seem to be an order dependency between zabbix-proxy and postgresql systemd unit files, not a requirement dependency. From my limited understanding of systemd, using After=postgresql.service option will only define the order in which services should be started, but will not make it so that stopping postgresql.service will stop zabbix-proxy.service. This is what should happen, and that would require using one of Wants=, Requires=, PartOf=, ...
https://www.freedesktop.org/software/systemd/man/systemd.unit.html
Current unit file
[Unit] Description=Zabbix Proxy After=syslog.target After=network.target After=postgresql.service [Service] Environment="CONFFILE=/etc/zabbix/zabbix_proxy.conf" EnvironmentFile=-/etc/default/zabbix-proxy Type=forking Restart=on-failure PIDFile=/run/zabbix/zabbix_proxy.pid KillMode=control-group ExecStart=/usr/sbin/zabbix_proxy -c $CONFFILE ExecStop=/bin/kill -SIGTERM $MAINPID RestartSec=10s TimeoutSec=infinity [Install] WantedBy=multi-user.target
For those interested, i have added the following for my use case (not responsible for loss of proxy data, bla bla):
[Unit] PartOf=postgresql.service [Service] TimeoutSec=90s
- mentioned in
-
Page Loading...