From 950d5ef187d5cf4ec7e5176bb698d231f32ad3d4 Mon Sep 17 00:00:00 2001 From: Adam King Date: Fri, 6 Sep 2024 09:04:37 -0400 Subject: [PATCH] mgr/cephadm: stop running "true" before every command It turns out this is completely unnecessary. With the keepalive settings on the connection, we no longer need to run an additional command with a timeout on it to quickly detect a host is offline Signed-off-by: Adam King (cherry picked from commit 36a8e202a2b34748899ec432c3eac8ebee132d6a) --- src/pybind/mgr/cephadm/ssh.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/pybind/mgr/cephadm/ssh.py b/src/pybind/mgr/cephadm/ssh.py index 4a30c067709..1622cb001ab 100644 --- a/src/pybind/mgr/cephadm/ssh.py +++ b/src/pybind/mgr/cephadm/ssh.py @@ -242,10 +242,6 @@ class SSHManager: if log_command: logger.debug(f'Running command: {rcmd}') try: - test_cmd = RemoteSudoCommand( - Executables.TRUE, [], use_sudo=use_sudo - ) - r = await conn.run(str(test_cmd), check=True, timeout=5) # host quick check r = await conn.run(str(rcmd), input=stdin) # handle these Exceptions otherwise you might get a weird error like # TypeError: __init__() missing 1 required positional argument: 'reason' (due to the asyncssh error interacting with raise_if_exception) -- 2.39.5