From 05a7388f3ef25ce5c25f5a4b379e6830ee0196ed Mon Sep 17 00:00:00 2001 From: Jonathan Abrahams Date: Thu, 12 Apr 2018 17:40:55 -0400 Subject: SERVER-34444 Reestablish a new connection to LocalToRemoteOperations after crash in powercycle.py --- pytests/powertest.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'pytests') diff --git a/pytests/powertest.py b/pytests/powertest.py index ed8dbf76381..df07dd2b8c9 100755 --- a/pytests/powertest.py +++ b/pytests/powertest.py @@ -2072,7 +2072,8 @@ Examples: # The remote mongod host comes from the ssh_user_host, # which may be specified as user@host. - ssh_user, ssh_host = get_user_host(options.ssh_user_host) + ssh_user_host = options.ssh_user_host + ssh_user, ssh_host = get_user_host(ssh_user_host) mongod_host = ssh_host ssh_connection_options = "{} {}".format(default_ssh_connection_options, @@ -2098,7 +2099,7 @@ Examples: address_type = "private_ip_address" # Instantiate the local handler object. - local_ops = LocalToRemoteOperations(user_host=options.ssh_user_host, + local_ops = LocalToRemoteOperations(user_host=ssh_user_host, ssh_connection_options=ssh_connection_options, ssh_options=ssh_options, use_shell=True) @@ -2340,9 +2341,11 @@ Examples: else: ssh_user_host = "{}@{}".format(ssh_user, ssh_host) mongod_host = ssh_host - local_ops = LocalToRemoteOperations(user_host=ssh_user_host, - ssh_connection_options=ssh_connection_options, - ssh_options=ssh_options, use_shell=True) + + # Reestablish remote access after crash. + local_ops = LocalToRemoteOperations(user_host=ssh_user_host, + ssh_connection_options=ssh_connection_options, + ssh_options=ssh_options, use_shell=True) canary_doc = copy.deepcopy(orig_canary_doc) -- cgit v1.2.1