-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(systemd): fix service detection #94
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks.
Note: I did a quick search (grep -ir list-units) and see this in Airflow & Prometheus formulas but only used in their clean states so not an issue.
Not sure why Amazonlinux fails. |
mmm... might be a bug in salt I've seen some time ago, and might still be there. Enabling and launching at the same time fails. Splitting into 2 states (service.enabled and service.running) might do the trick. |
HI, this PR is quite old now but I' interested in reviewing it to merge it if possible because I'm facing the same bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edit: previous comment was wrong
@@ -29,7 +29,7 @@ include: | |||
service.dead: | |||
- name: {{ servicename }} | |||
{% if grains.kernel|lower == 'linux' %} | |||
- onlyif: systemctl list-units |grep {{ servicename }} >/dev/null 2>&1 | |||
- onlyif: systemctl list-unit-files |grep {{ servicename }} >/dev/null 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need those onlyif
in service.*
states?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... ensure it is dead only if the service exists?
Just fixing it, have not checked further if it would work without it at all.
I rebased this branch on
and I still have a problem with service not running
|
FYI: even removing those |
Fix service detection to properly ensure the service is running. Command also updated at other service.running/dead onlyif.
d8fa40a
to
96b02bc
Compare
Testing daks test, and getting the same error, but... Salt states in is running while applying...
And tests states it is not
Removing that test. If anyone has ideas about it... |
e853bf5
to
96b02bc
Compare
Test shows: Service mongos has been enabled, and is dead Attempt to split running and enable states
3c235c5
to
ce9c356
Compare
Fix service detection to properly ensure the service is running.
Command also updated at other service.running/dead onlyif.
Fixes #93 with the change suggested there