Skip to content
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

adding loaded feature to mac_service #46206

Merged
merged 3 commits into from Mar 7, 2018

Conversation

@weswhet
Copy link
Collaborator

@weswhet weswhet commented Feb 26, 2018

What does this PR do?

Adds the ability for the mac_service module to recognize whether or not a mac service should have an active PID when checking the status, as some macOS services run on intervals or are initiated by other manners. This improves the support for the service state which previously would only work properly for services that are set be always running with an active PID.

What issues does this PR fix or reference?

None

Previous Behavior

service.status on macOS would return an empty string for any service that did not have an active PID. Which would send a false positive of sorts to the service state module.

New Behavior

Salt will now check the macOS service to see whether or not the service should actively be running by checking the KeepAlive key in service plist. If the service is not meant to be always running but the service is properly loaded in launchd service.status will now return a string 'loaded'.

CC @gtmanfred as we briefly talked about this addition.

Tests written?

No

Commits signed with GPG?

Yes

@rallytime rallytime requested a review from gtmanfred Feb 27, 2018
@rallytime
Copy link
Contributor

@rallytime rallytime commented Feb 28, 2018

Welcome @weswhet! Thank you for this change.

Looks like there is a lint error on this: https://jenkins.saltstack.com/job/PR/job/salt-pr-lint-n/19595/violations/file/salt/modules/mac_service.py/

Can you fix that up?

@weswhet
Copy link
Collaborator Author

@weswhet weswhet commented Feb 28, 2018

Thanks for the warm welcome @rallytime, lint check is passing now. Let me know if I need to do anything else. 😄

:rtype: bool
.. versionadded::
Copy link
Contributor

@rallytime rallytime Mar 2, 2018

Oops, this line should be .. versionadded:: Fluorine

Copy link
Collaborator Author

@weswhet weswhet Mar 5, 2018

whoops, looks like you beat me to it. Thanks

@rallytime rallytime merged commit f9b9109 into saltstack:develop Mar 7, 2018
5 of 10 checks passed
5 of 10 checks passed
jenkins/PR/salt-pr-linode-cent7-py3 Pull Requests » Salt PR - Linode CentOS 7 - PY3 #2851 — ABORTED
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #16902 — ABORTED
Details
default Build finished.
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #20501 — FAILURE
Details
jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #7458 — FAILURE
Details
@wip[bot]
WIP ready for review
Details
codeclimate All good!
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #22905 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #15235 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #19848 — SUCCESS
Details
@weswhet weswhet deleted the add-mac_service-loaded-feature branch Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants