diff options
author | Jonathan Abrahams <jonathan@Jonathans-MacBook-Pro.local> | 2018-09-13 10:30:39 -0400 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2018-09-13 12:29:28 -0400 |
commit | f4d62c2ba9a27dc03663779d0817bc399ab2e91f (patch) | |
tree | 9b2a9d4d362853d765f39b24d16d07f7ad103d70 /buildscripts/remote_operations.py | |
parent | 0aae246c5dc62e4f6541b3afe66ba04eb2d02799 (diff) | |
download | mongo-f4d62c2ba9a27dc03663779d0817bc399ab2e91f.tar.gz |
SERVER-36162 Powercycle - ensure internal crash command has been executed on the remote host
Diffstat (limited to 'buildscripts/remote_operations.py')
-rwxr-xr-x | buildscripts/remote_operations.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/buildscripts/remote_operations.py b/buildscripts/remote_operations.py index a1f95f117e8..93798ae7ac1 100755 --- a/buildscripts/remote_operations.py +++ b/buildscripts/remote_operations.py @@ -35,6 +35,7 @@ _OPERATIONS = ["shell", "copy_to", "copy_from"] _SSH_CONNECTION_ERRORS = [ "Connection refused", + "Connection timed out during banner exchange", "Permission denied", "System is booting up.", "ssh_exchange_identification: read: Connection reset by peer", @@ -110,13 +111,22 @@ class RemoteOperations(object): # pylint: disable=too-many-instance-attributes return self._call(cmd) def access_established(self): - """Return True if initial access was establsished.""" + """Return True if initial access was established.""" return not self._access_code def access_info(self): """Return the return code and output buffer from initial access attempt(s).""" return self._access_code, self._access_buff + @staticmethod + def ssh_error(message): + """Return True if the error message is generated from the ssh client. + + This can help determine if an error is due to a remote operation failing or an ssh + related issue, like a connection issue. + """ + return message.startswith("ssh:") + def operation( # pylint: disable=too-many-branches self, operation_type, operation_param, operation_dir=None): """Execute Main entry for remote operations. Returns (code, output). |