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

In OpenRC exec module, make sure to ignore retcode on status #46101

Merged
merged 2 commits into from Feb 28, 2018

Conversation

jfindlay
Copy link
Contributor

@jfindlay jfindlay commented Feb 19, 2018

What does this PR do?

In the OpenRC exec module, make sure to ignore retcode on status.

What issues does this PR fix or reference?

For example, when a service is stopped, the retcode of /sbin/openrc-run status is
3, not 0.

Previous Behavior

# salt-call --local state.single service.dead my-service
[ERROR   ] Command '/etc/init.d/my-service status' failed with return code: 3
[ERROR   ] output:  * status: stopped
local:
----------
          ID: my-service
    Function: service.dead
      Result: True
     Comment: The service my-service is already dead
     Started: 05:46:06.918276
    Duration: 235.749 ms
     Changes:

Summary for local
------------
Succeeded: 1
Failed:    0
------------
Total states run:     1
Total run time: 235.749 ms

New Behavior

# salt-call --local state.single service.dead my-service
local:
----------
          ID: my-service
    Function: service.dead
      Result: True
     Comment: The service my-service is already dead
     Started: 05:46:31.445100
    Duration: 233.924 ms
     Changes:

Summary for local
------------
Succeeded: 1
Failed:    0
------------
Total states run:     1
Total run time: 233.924 ms

Tests written?

Yes

Commits signed with GPG?

Yes

In OpenRC, when a service is stopped, the retcode of /sbin/openrc-run is
3, not 0.
@rallytime rallytime merged commit a97a3e6 into saltstack:2017.7 Feb 28, 2018
@jfindlay jfindlay deleted the openrc_ret branch March 19, 2018 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants