Skip to content

Commit

Permalink
roachprod: shorten the connection timeout for ssh
Browse files Browse the repository at this point in the history
Based on cockroachdb#47567 we need to ensure that roachprod has timout for ssh connection after 5 seconds.

We are adding a timeout inside newRemoteSession function so the roachtest context cancellation does hide failure information by kill hanging processes before they fail.

Release note: None
  • Loading branch information
alan-mas committed Apr 27, 2021
1 parent 9f198e1 commit fb7853c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cmd/roachprod/install/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func newRemoteSession(user, host string, logdir string) (*remoteSession, error)
//
// https://github.com/cockroachdb/cockroach/issues/35337
"-o", "ServerAliveInterval=60",
// Timeout long connections so failure information is not lost by the roachtest
// context cancellation killing hanging roachprod processes.
"-o", "ConnectTimeout=5",
}
args = append(args, sshAuthArgs()...)
ctx, cancel := context.WithCancel(context.Background())
Expand Down

0 comments on commit fb7853c

Please sign in to comment.