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

Add pathstate to keepalive check in mac_service #49121

Merged
merged 1 commit into from Aug 15, 2018

Conversation

@Ch3LL
Copy link
Contributor

@Ch3LL Ch3LL commented Aug 14, 2018

What does this PR do?

The following tests:

integration.states.test_service.ServiceTest.test_service_dead
integration.states.test_service.ServiceTest.test_service_dead_init_delay
integration.states.test_service.ServiceTest.test_service_running

are failing on macosx after this PR: #46206

The service we use in our test suite sets keepalive with PathState setting. From the launchd docs there are also other ways to set keepalive besides just setting it to be True. This PR only handles PathState so more cases will need to be added. I moved the _always_running_service check after we check for pids to try to retain backwards compatibility. If the service actually returns a pid we return that and not loaded if the check for KeepAlive is not added to the code yet.

@Ch3LL
Copy link
Contributor Author

@Ch3LL Ch3LL commented Aug 14, 2018

ping @weswhet tried to add you as a reviewer but doesn't seem i can. if you could give this a review :)

@weswhet
Copy link
Collaborator

@weswhet weswhet commented Aug 14, 2018

This looks good to me. For more info on keepalive services checkout http://www.launchd.info > Configurations > KeepAlive

@cachedout cachedout merged commit 94ee734 into saltstack:fluorine Aug 15, 2018
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants