Bug 1132437 - Wrong Type in systemd unit-file
Summary: Wrong Type in systemd unit-file
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: zabbix20
Version: epel7
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Volker Fröhlich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-21 11:16 UTC by Mikael Bergemalm
Modified: 2014-09-27 18:44 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2014-09-27 18:44:45 UTC


Attachments (Terms of Use)

Description Mikael Bergemalm 2014-08-21 11:16:54 UTC
Description of problem: Zabbix forks during start causing systemctl not to function as expected (stop/restarts) when unit-file has Type=oneshot.


Version-Release number of selected component (if applicable): zabbix20-agent-2.0.12-3.el7.x86_64


Steps to Reproduce:
1. systemctl stop zabbix-agent

Actual results: zabbix daemons won't exit.


Expected results: zabbix daemons should be stopped.


Additional info: This is solved by using the Type=forking instead.

# cat /usr/lib/systemd/system/zabbix-agent.service 
[Unit]
Description=Zabbix Monitor Agent
After=syslog.target network.target

[Service]
Type=forking
ExecStart=/usr/sbin/zabbix_agentd
RemainAfterExit=yes
User=zabbix

[Install]
WantedBy=multi-user.target

Comment 1 Volker Fröhlich 2014-09-01 22:40:35 UTC
Solved in zabbix22 2.2.6-2 in EL7, zabbix 2.2.6-2 in Rawhide and F21 so far

Comment 2 Mikael Bergemalm 2014-09-04 12:42:40 UTC
The PIDFile statement should also be added, status might be inaccurate otherwise.
"PIDFile=/var/run/zabbix/zabbix_agentd.pid".

So in total:

[Unit]
Description=Zabbix Monitor Agent
After=syslog.target network.target

[Service]
Type=forking
ExecStart=/usr/sbin/zabbix_agentd
RemainAfterExit=yes
User=zabbix
PIDFile=/var/run/zabbix/zabbix_agentd.pid

[Install]
WantedBy=multi-user.target

Comment 3 Mikael Bergemalm 2014-09-05 19:25:47 UTC
As with the zabbix22-agent, the RemainAfterExit should be removed as well. (didn't think about that line).

Comment 4 Fedora Update System 2014-09-11 15:27:53 UTC
zabbix20-2.0.13-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/zabbix20-2.0.13-1.el7

Comment 5 Fedora Update System 2014-09-12 19:07:48 UTC
Package zabbix20-2.0.13-1.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing zabbix20-2.0.13-1.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-2644/zabbix20-2.0.13-1.el7
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-09-27 18:44:45 UTC
zabbix20-2.0.13-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.