salt: Invalid systemd service unit on RHEL7/CentOS7
The system service unit for salt-minion 2015.8.5 from repo.saltstack.com
(salt-master might be affected in the same way) contains an invalid directive:
[Unit]
Description=The Salt Minion
After=network.target
[Service]
EnvironmentFile=/etc/default/salt-minion
Type=simple
LimitNOFILE=8192
ExecStart=/usr/bin/salt-minion
KillMode=process
Restart=$RESTART
[Install]
WantedBy=multi-user.target
The problem is Restart=$RESTART
, where $RESTART
is most likely the result of a problem in the build process of the package. The value should be one of:
- on-success
- on-failure
- on-abnormal
- on-watchdog
- on-abort
- always
See also the systemd.service documentation.
Version information:
Salt Version:
Salt: 2015.8.5
Dependency Versions:
Jinja2: 2.7.2
M2Crypto: 0.21.1
Mako: Not Installed
PyYAML: 3.11
PyZMQ: 14.7.0
Python: 2.7.5 (default, Nov 20 2015, 02:00:19)
RAET: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
cffi: Not Installed
cherrypy: Not Installed
dateutil: 1.5
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
libgit2: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: Not Installed
smmap: Not Installed
timelib: Not Installed
System Versions:
dist: centos 7.2.1511 Core
machine: x86_64
release: 3.10.0-123.8.1.el7.x86_64
system: CentOS Linux 7.2.1511 Core
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 26 (22 by maintainers)
This is classified as a severe bug and open for 3.5 months now. I really think the
$RESTART
variable should be replaced by the desired defaultno
and/etc/default/salt-minion
should be removed as this is obviously not working according to the systemd specification.@eliasp This issue appears to be resolved, if you are satisfied with the outcome, can you close it ?, or let me know of further issues to be addressed.
@eliasp @maxhq @sastorsl @djsly @vutny Systemd support has been revamped in Salt 2015.8.12 and 2016.3.3 and the service units have been rewritten and no longer make use of the environment variable $RESTART, and type=simple has been changed to type=notify appropriately. Upgrading salt from earlier versions to the latest branch versions specified above, the minion’s now automatically restart.
I would like to close this issue if the recent updates resolve your issues.