feat: reuse SSH connections for multi-profile deployments#358
Closed
XYenon wants to merge 2 commits intoserokell:masterfrom
Closed
feat: reuse SSH connections for multi-profile deployments#358XYenon wants to merge 2 commits intoserokell:masterfrom
XYenon wants to merge 2 commits intoserokell:masterfrom
Conversation
Use OpenSSH ControlMaster to multiplex SSH connections when deploying multiple profiles to the same node. This avoids establishing a new SSH connection for each profile, significantly improving deployment speed. - Add ssh module with SshControlMaster and SshMultiplexer - Establish control master after build, before push/deploy - Inject ControlPath option into ssh_opts for all SSH commands - Use XDG_RUNTIME_DIR/TMPDIR for socket files (secure, user-private) - Add --no-ssh-multiplexing flag to disable (enabled by default) - Clean up control masters when deployment completes
…issue By default, rollback check now uses a fresh SSH connection instead of reusing multiplexed connections. This prevents false-positive success when SSH is broken but an existing connection is still open. Fixes: #106
95d6407 to
4bd4cab
Compare
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.
SSH Connection Multiplexing (fixes #225)
SshControlMasterandSshMultiplexerin newsrc/ssh.rsmoduleControlMasterfunctionality to maintain persistent connectionsXDG_RUNTIME_DIR,TMPDIR, or~/.cache--no-ssh-multiplexingflag to disable this featureRollback Check Safety (fixes #106)
--no-rollback-fresh-connectionflag to control rollback check behaviorsshdis brokenControlPath/ControlMasteroptions and add-o ControlPath=nonefor rollback checks