[Helper] Support non-root SSH users for cold standby - #7371
Open
pi0n00r wants to merge 1 commit into
Open
Conversation
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.
Contribution Guidelines
What does this PR include?
Short Description
This PR allows the cold-standby destination to be reached through a non-root
SSH account while preserving
rootas the default.It is a clean reimplementation, based directly on current
staging, of theremote-user goal previously raised in #6612 and #6613. It contains no unrelated
history and no watchdog changes.
The helper now:
REMOTE_SSH_USER, defaulting toroot;REMOTE_SSH_PORTto22;policy;
root-equivalent
sudo -naccess during preflight;non-interactive sudo for non-root users;
sudo -n rsyncas the remote rsync path when required;-loption; andThe tracked launcher remains root-compatible and documents the non-root option.
Affected Containers
Did you run tests?
Yes.
What did you test?
helper-scripts/tests/test_cold_standby_non_root.shroot@...target remainsThis candidate has not yet been exercised in a fresh end-to-end standby
migration.
What were the final results? (Awaited, got)
Expected:
sudo -n; andGot: