-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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 2 issues in sysvinit module #42786
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansibot
added
affects_2.7
This issue/PR affects Ansible v2.7
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
module
This issue/PR relates to a module.
needs_triage
Needs a first human triage before being processed.
new_contributor
This PR is the first contribution by a new community member.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
labels
Jul 14, 2018
achinthagunasekara
approved these changes
Jul 14, 2018
Akasurde
removed
the
needs_triage
Needs a first human triage before being processed.
label
Jul 16, 2018
pilou-
added a commit
to pilou-/ansible
that referenced
this pull request
Aug 5, 2018
gundalow
pushed a commit
that referenced
this pull request
Aug 8, 2018
* service tests: check that daemon is really running (spoiler: it isn't) * service tests: add PIDFile directive in systemd unit * service tests: check 'changed' too * service tests: fix indentation & use changed test * service tests: #16694 has been fixed a long time ago * service tests: refactor - always execute cleaning tasks - move tests tasks in a dedicated file * service tests: add test for #42786 * service tests: display value of ansible_service_mgr * service tests: allow to run tests twice in a row stop & disable ansible test service * service tests: 'pattern' value must be a substring 'pattern' parameter is poorly named * service tests: check ansible_test service status * service tests: test daemon must handle SIGHUP because 'initctl reload' sends SIGHUP, otherwise test daemon stops when receiving the signal * service tests: remove upstart override file too and check that files were removed using raw module and stat command
pilou-
pushed a commit
to pilou-/ansible
that referenced
this pull request
Aug 8, 2018
* Do not compare result to unset parameter in sysvinit module * Fix misformed command in sysvinit module * Small None-comparison style fix in sysvinit module (cherry picked from commit f26272a)
pilou-
added a commit
to pilou-/ansible
that referenced
this pull request
Aug 8, 2018
* service tests: check that daemon is really running (spoiler: it isn't) * service tests: add PIDFile directive in systemd unit * service tests: check 'changed' too * service tests: fix indentation & use changed test * service tests: ansible#16694 has been fixed a long time ago * service tests: refactor - always execute cleaning tasks - move tests tasks in a dedicated file * service tests: add test for ansible#42786 * service tests: display value of ansible_service_mgr * service tests: allow to run tests twice in a row stop & disable ansible test service * service tests: 'pattern' value must be a substring 'pattern' parameter is poorly named * service tests: check ansible_test service status * service tests: test daemon must handle SIGHUP because 'initctl reload' sends SIGHUP, otherwise test daemon stops when receiving the signal * service tests: remove upstart override file too and check that files were removed using raw module and stat command (cherry picked from commit c5f37f6)
mattclay
pushed a commit
that referenced
this pull request
Aug 9, 2018
* service tests: check that daemon is really running (spoiler: it isn't) * service tests: add PIDFile directive in systemd unit * service tests: check 'changed' too * service tests: fix indentation & use changed test * service tests: #16694 has been fixed a long time ago * service tests: refactor - always execute cleaning tasks - move tests tasks in a dedicated file * service tests: add test for #42786 * service tests: display value of ansible_service_mgr * service tests: allow to run tests twice in a row stop & disable ansible test service * service tests: 'pattern' value must be a substring 'pattern' parameter is poorly named * service tests: check ansible_test service status * service tests: test daemon must handle SIGHUP because 'initctl reload' sends SIGHUP, otherwise test daemon stops when receiving the signal * service tests: remove upstart override file too and check that files were removed using raw module and stat command (cherry picked from commit c5f37f6)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.7
This issue/PR affects Ansible v2.7
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
module
This issue/PR relates to a module.
new_contributor
This PR is the first contribution by a new community member.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
The
sysvinit
module had 2 problems that I was running into. Firstly, even without setting any desired state forenabled
it would still always reportchanged
because it was comparing the actual state to thisNone
variable (having not been set).Secondly the command that was executed to bring a service to a
started
state was just wrong, and I rewrote it to make it work for me. I hope I don't break it for others as it is quite different, but at the same time the current result made absolutely no sense to me.Fixes #42620
ISSUE TYPE
COMPONENT NAME
sysvinit
ANSIBLE VERSION
ADDITIONAL INFORMATION
I think everything is explained by me in issue #42620