Skip to content

Commit

Permalink
test-git-branch: add ServerAliveInterval to ssh options
Browse files Browse the repository at this point in the history
this prevents the ssh control master connection from getting stuck

Signed-off-by: Kent Overstreet <[email protected]>
  • Loading branch information
Kent Overstreet committed Oct 14, 2024
1 parent da8b317 commit 9a71187
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/test-git-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ ssh_retry() {
set +o errexit

while true; do
ssh "$@"
ssh -o 'ControlMaster=auto' \
-o 'ControlPath=~/.ssh/master-%r@%h:%p' \
-o 'ControlPersist=10m' \
-o 'ServerAliveInterval=10' \
"$@"
(($? == 0)) && break
sleep 1
tput cuu1
Expand Down Expand Up @@ -186,7 +190,7 @@ run_test_job() {

while true; do
tar --create --file - $COMMIT|
ssh $JOBSERVER "(cd $JOBSERVER_OUTPUT_DIR; tar --extract --file -)"
ssh_retry $JOBSERVER "(cd $JOBSERVER_OUTPUT_DIR; tar --extract --file -)"
(($? == 0)) && break
sleep 1
tput cuu1
Expand Down

0 comments on commit 9a71187

Please sign in to comment.