Skip to content

Commit 558e241

Browse files
authored
Nemesis: ssh flags and py3 fixes (ydb-platform#6111)
1 parent 460d363 commit 558e241

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ydb/tests/library/nemesis/remote_execution.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ def execute_command_with_output(command, timeout=60):
2626
f_err.flush()
2727
f_err.seek(0)
2828
std_err_lines = list(f_err.readlines())
29+
std_err_lines = [line.decode("utf-8", errors='replace') for line in std_err_lines]
2930
if process_return_code is not None:
3031
f_out.flush()
3132
f_out.seek(0)
3233
list_of_lines = list(f_out.readlines())
34+
list_of_lines = [line.decode("utf-8", errors='replace') for line in list_of_lines]
3335

3436
logger.info("Finished execution command = {}".format(command))
3537
if logger.isEnabledFor(logging.DEBUG):
@@ -74,7 +76,7 @@ def execute_command_with_output_on_hosts(list_of_hosts, command, per_host_timeou
7476

7577
def execute_command_with_output_single_host(host, command, timeout=60, username=None):
7678
username_at_host = host if username is None else username + '@' + host
77-
full_cmd = ["ssh", username_at_host] + command
79+
full_cmd = ["ssh", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-A", username_at_host] + command
7880

7981
retcode, output = execute_command_with_output(full_cmd, timeout=timeout)
8082
return retcode, output

0 commit comments

Comments
 (0)