summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuildscripts/resmokelib/powercycle/powercycle.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/buildscripts/resmokelib/powercycle/powercycle.py b/buildscripts/resmokelib/powercycle/powercycle.py
index c493ac7c22a..5c0c4cc0cfd 100755
--- a/buildscripts/resmokelib/powercycle/powercycle.py
+++ b/buildscripts/resmokelib/powercycle/powercycle.py
@@ -565,6 +565,8 @@ def call_remote_operation(local_ops, remote_python, script_name, client_args, op
"""Call the remote operation and return tuple (ret, ouput)."""
client_call = f"{remote_python} {script_name} {client_args} {operation}"
ret, output = local_ops.shell(client_call)
+ if local_ops.ssh_error(output):
+ ssh_failure_exit(ret, output)
return ret, output
@@ -792,7 +794,8 @@ def remote_handler(options, task_config, root_dir):
# Perform the sequence of operations specified. If any operation fails then return immediately.
for operation in options.remote_operations:
ret = 0
- if operation == "noop":
+
+ def noop():
pass
# This is the internal "crash" mechanism, which is executed on the remote host.
@@ -945,10 +948,10 @@ def remote_handler(options, task_config, root_dir):
return ret
op_map = {
- "crash_server": crash_server, "kill_mongod": kill_mongod, "install_mongod":
- install_mongod, "start_mongod": start_mongod, "stop_mongod": stop_mongod,
- "shutdown_mongod": shutdown_mongod, "rsync_data": rsync_data, "seed_docs": seed_docs,
- "set_fcv": set_fcv, "check_disk": check_disk
+ "noop": noop, "crash_server": crash_server, "kill_mongod": kill_mongod,
+ "install_mongod": install_mongod, "start_mongod": start_mongod, "stop_mongod":
+ stop_mongod, "shutdown_mongod": shutdown_mongod, "rsync_data": rsync_data,
+ "seed_docs": seed_docs, "set_fcv": set_fcv, "check_disk": check_disk
}
if operation not in op_map:
@@ -1540,7 +1543,6 @@ def main(parser_actions, options): # pylint: disable=too-many-branches,too-many
setup_ssh_tunnel(mongod_host, secret_port, standard_port, ssh_connection_options,
ssh_options, ssh_user_host)
- verify_remote_access(local_ops)
# Optionally validate canary document locally.
if validate_canary_local: