[BUG] service.running state using the provider option does not work as expected
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
The service.running state using the provider option does not work as expected. If a service is in the /etc/init.d directory with correct permissions but has not been added to chkconfig it will say that service is not found when running the state. If you add the service to chkconfig manually then run the state it will work perfectly
Setup
include:
- activemq.sls.java
- users.calypso.activemq
activemq.rpm.packages:
pkg.installed:
- pkgs:
- "activemq-dist"
- "activemq-dist-client"
- refresh: True
- require:
- sls: users.calypso.activemq
- order: 1
activemq.start:
service.running:
- name: activemq
- reload: True
- provider: service
- enable: {{ salt['pillar.get']('activemq.settings:lookup:chkconfig') }}
- order: 2
Steps to Reproduce the behavior
(Include debug logs if possible and relevant)
Expected behavior
Since one of the options of the service.running state is enable i would hope that it would attempt to add the service if it was not in chkconfig and enable it.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)salt --versions-report
Salt Version:
Salt: 3002.2
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: 0.6.4
gitpython: 1.0.1
Jinja2: 2.11.1
libgit2: Not Installed
M2Crypto: 0.35.2
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.6.8 (default, Nov 16 2020, 16:55:22)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.0.0
smmap: 0.9.0
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.4
System Versions:
dist: centos 7 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-1160.24.1.el7.x86_64
system: Linux
version: CentOS Linux 7 Core
salt-minion --versions-report
Salt Version:
Salt: 3003
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.11.1
libgit2: Not Installed
M2Crypto: 0.35.2
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.6.8 (default, Nov 16 2020, 16:55:22)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.0.0
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.1.4
System Versions:
dist: centos 7 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-1160.25.1.el7.x86_64
system: Linux
version: CentOS Linux 7 Core
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the service.running state using provider: service on CentOS 7, focusing on the /etc/init.d and chkconfig behavior described in the issue. Reproduce the supplied activemq.start SLS before and after manual chkconfig registration. Done means a correctly permissioned, unregistered init script is found and enabled when enable is requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100