diff options
author | Jonathan Abrahams <jonathan@mongodb.com> | 2017-11-07 10:09:51 -0500 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2017-11-07 10:09:51 -0500 |
commit | 9b1e2cde6932e9c7b5e05c2c23de0f8fdda2f30e (patch) | |
tree | 644955f2434dc35440ddc17858b5ebc922c560d0 /buildscripts | |
parent | 82448e638f736c505cf5caccbbefe058cddcf15f (diff) | |
download | mongo-9b1e2cde6932e9c7b5e05c2c23de0f8fdda2f30e.tar.gz |
SERVER-31131 remote_operations.py needs to handle ssh connection errors
Diffstat (limited to 'buildscripts')
-rwxr-xr-x | buildscripts/remote_operations.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/buildscripts/remote_operations.py b/buildscripts/remote_operations.py index 8096ba94cde..e2436ece3d9 100755 --- a/buildscripts/remote_operations.py +++ b/buildscripts/remote_operations.py @@ -35,6 +35,8 @@ _IS_WINDOWS = sys.platform == "win32" or sys.platform == "cygwin" _OPERATIONS = ["shell", "copy_to", "copy_from"] +_SSH_CONNECTION_ERRORS = ["System is booting up.", "Permission denied"] + def posix_path(path): """ Returns posix path, used on Windows since scp requires posix style paths. """ @@ -100,7 +102,8 @@ class RemoteOperations(object): buff = "" while True: ret, buff = self._call(cmd) - if not ret: + # Ignore any connection errors before sshd has fully initialized. + if not ret and not any(ssh_error in buff for ssh_error in _SSH_CONNECTION_ERRORS): return ret, buff attempt_num += 1 if attempt_num > self.retries: |