summaryrefslogtreecommitdiff
path: root/pytests
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2019-01-03 23:26:01 -0500
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2019-01-03 23:26:01 -0500
commit198aeb34b035a128834205b7f8d1cde9fc2235c4 (patch)
treeecfa3215b146f3eb805d2270458d4fb13a774254 /pytests
parent5985816cea88517d2433c8108434777bd9bc34a5 (diff)
downloadmongo-198aeb34b035a128834205b7f8d1cde9fc2235c4.tar.gz
SERVER-37490 Increase ssh ConnectTimeout from 10 to 30 seconds.
(cherry picked from commit 63af6676e353eafa00b6178737085606836e6139)
Diffstat (limited to 'pytests')
-rwxr-xr-xpytests/powertest.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pytests/powertest.py b/pytests/powertest.py
index abe762494e3..b553b35308d 100755
--- a/pytests/powertest.py
+++ b/pytests/powertest.py
@@ -1746,7 +1746,7 @@ Examples:
default_ssh_connection_options = ("-o ServerAliveCountMax=10"
" -o ServerAliveInterval=6"
" -o StrictHostKeyChecking=no"
- " -o ConnectTimeout=10"
+ " -o ConnectTimeout=30"
" -o ConnectionAttempts=20")
test_options.add_option("--sshConnection", dest="ssh_connection_options",
help="Server ssh additional connection options, i.e., '-i ident.pem'"
@@ -2231,9 +2231,12 @@ Examples:
ssh_user, ssh_host = get_user_host(ssh_user_host)
mongod_host = ssh_host
- ssh_connection_options = "{} {}".format(default_ssh_connection_options,
- options.ssh_connection_options
- if options.ssh_connection_options else "")
+ # As described in http://man7.org/linux/man-pages/man5/ssh_config.5.html, ssh uses the value of
+ # the first occurrence for each parameter, so we have the default connection options follow the
+ # user-specified --sshConnection options.
+ ssh_connection_options = "{} {}".format(options.ssh_connection_options
+ if options.ssh_connection_options else "",
+ default_ssh_connection_options)
# For remote operations requiring sudo, force pseudo-tty allocation,
# see https://stackoverflow.com/questions/10310299/proper-way-to-sudo-over-ssh.
# Note - the ssh option RequestTTY was added in OpenSSH 5.9, so we use '-tt'.