-
Incident report
-
Resolution: Fixed
-
Major
-
None
Zabbix agent init script incorrectly detects running process on Debian OpenVZ host.
Here is an example:
- First check running process on OpenVZ guest
root@vm200:/# service zabbix-agent status [ ok ] zabbix_agentd is running. root@vm200:/# service zabbix-agent stop [ ok ] Stopping Zabbix agent: zabbix_agentd. root@vm200:/# service zabbix-agent status [FAIL] zabbix_agentd is not running ... failed!
Init script process detection works as expected
- Then check running process on OpenVZ host
root@srv5:~# service zabbix-agent status zabbix_agentd is running. root@srv5:~# service zabbix-agent stop Stopping Zabbix agent: zabbix_agentd. root@srv5:~# service zabbix-agent status zabbix_agentd is running.
Init script incorrectly detects running process because the same process name already running on guest
How to fix
--- /etc/init.d/zabbix-agent.orig 2014-06-13 09:48:35.732033503 +0300 +++ /etc/init.d/zabbix-agent 2014-06-13 09:49:06.609563758 +0300 @@ -48,7 +48,7 @@ esac ;; status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + status_of_proc -p "$PID" "$DAEMON" "$NAME" && exit 0 || exit $? ;; restart|force-reload) $0 stop
After this changes process detections works as expected on OpenVZ host
root@srv5:~# service zabbix-agent status zabbix_agentd is not running ... failed! root@srv5:~# service zabbix-agent start Starting Zabbix agent: zabbix_agentd. root@srv5:~# service zabbix-agent status zabbix_agentd is running. root@srv5:~# service zabbix-agent stop Stopping Zabbix agent: zabbix_agentd. root@srv5:~# service zabbix-agent status zabbix_agentd is not running ... failed!
Please include this fix into standard Debian package.
- is duplicated by
-
ZBX-9165 Zabbix Init script shipped in 1:2.4.3-1+wheezy-i386 does not report status properly
- Closed