You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Service openvpn is parameterized/templated, and its unit file name [email protected] is different from instantiated service names like [email protected]:
Because Salt lists unit files before running any systemd command to manage services, it will report this problem:
[INFO ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[ERROR ] The named service [email protected] is not available
Versions
Fedora 19 x86_64
salt --versions-report
Salt: 0.17.1
Python: 2.7.5 (default, Oct 8 2013, 12:19:40)
Jinja2: 2.6
M2Crypto: 0.21.1
msgpack-python: 0.1.13
msgpack-pure: Not Installed
pycrypto: 2.6.1
PyYAML: 3.10
PyZMQ: 13.0.0
ZMQ: 3.2.4
I believe Salt should take optimistic approach and try to call systemctl enable for such parameterized/templated services regardless of any evidence that such service may be configured.
To give some protection and analytical output in the logs, before running the systemctl command, Salt may ensure that [email protected] unit file actually exists when it sees @ sign in strings like [email protected].
Example
The following state file for parameterized/templated
openvpn
service will fail withsystemd
:Service
openvpn
is parameterized/templated, and its unit file name[email protected]
is different from instantiated service names like[email protected]
:Because Salt lists unit files before running any
systemd
command to manage services, it will report this problem:Versions
Fedora 19 x86_64
See Also
The following issues seem related:
systemctl list-unit-files
for finding systemd units. #1908Links:
Workaround
For basic service management (enable/disable, start/stop) explicit
systemctl
commands can be used:The text was updated successfully, but these errors were encountered: