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
Document that service.running uses service <service> status
and interprets by return code
#16245
Comments
Hrm, strange, we'll definitely investigate this. |
I think what is going on is that salt is relying on the exit code to the service call to determine if the service is running. If I hack the call to
I'm guessing this would not be considered an issue with Salt--but I leave you to disposition this as you see fit. Maybe the docs could mention the requirement that the service returns the correct status code (sorry if I missed that). Anyway, I will take the non-conformance up with the ambari folks. Sorry for not figuring it out before filing it... |
Interesting. Good catch. I am going to mark this as an upstream bug, but you're right, we definitely need to put a note in the docs noting that we interpret success by return code. |
service <service> status
and interprets by return code
I changed my mind, I'm going to just utilize this issue for the documentation. |
This link covers the expected status code from an init script status, which might be useful for the documentation: http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html |
Awesome, thanks for adding that. |
Fixed in documentation by #19877 |
Awesome, thanks @twellspring! |
Thanks for documenting this @twellspring & @cupdike. I've been running into the same problem. |
salt 2014.1.10 (Hydrogen) on Redhat 6.5
Doing a service 'running' state, I expect it to start an "ambari-server" service. But salt thinks the service is running and does not start it. Here, the service module's status function demonstrates the problem. Both ps and a service status show it is not running, but service.status returns True:
Perhaps the stale pid file message is at play. But when I run the OS command that is being logged, it looks like it should work so I'm not sure where salt is making the final determination that it's running:
The text was updated successfully, but these errors were encountered: