Improve cc_set_passwords.#1456
Merged
Merged
Conversation
- If the system doesn't use systemd and the status of the ssh service is not 0, then apply the pw_auth config. As distros as Alpine could start the ssh service later in the boot sequence. - Change log level from warning to debug when ssh_pwauth is written but the ssh service is not restarted.
5512cec to
38cedfa
Compare
blackboxsw
requested changes
May 16, 2022
Collaborator
blackboxsw
left a comment
There was a problem hiding this comment.
Let's move this not uses_systemd conditional first so we can avoid compound conditionals for the uses_systemd exit_code 3 & 4 cases.
| service, | ||
| ) | ||
| return | ||
| elif not uses_systemd: |
Collaborator
There was a problem hiding this comment.
It probably makes sense to shuffle this condition up first so we can drop the if uses_systemd and ... in the other conditionals
if not distro.uses_systemd():
<your new debug log>
elif e.exit_code == 3:
<existing exit_code 3 behavior>
elif e.exid_code == 4:
< existing exit_code 4 behavior>
else:
LOG.warning(Ignoring...)
return
Contributor
Author
There was a problem hiding this comment.
Simplified. Thanks for the suggestion @blackboxsw.
Contributor
Author
|
This one is ready to review. Thanks @blackboxsw. |
blackboxsw
approved these changes
May 17, 2022
Collaborator
blackboxsw
left a comment
There was a problem hiding this comment.
+1 Thanks for this work @aciba90
This was referenced May 12, 2023
Closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
If the system doesn't use systemd and the status of the ssh
service is not 0, then apply the pw_auth config. As distros as
Alpine could start the ssh service later in the boot sequence.
Change log level from warning to debug when ssh_pwauth is
written but the ssh service is not restarted.
Proposed Commit Message
Additional Context
SC-968
#1450 (comment)
Test Steps
Checklist: