From: Adam King Date: Fri, 6 Sep 2024 13:04:37 +0000 (-0400) Subject: mgr/cephadm: stop running "true" before every command X-Git-Tag: testing/wip-vshankar-testing-20240917.043942-debug~42^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=36a8e202a2b34748899ec432c3eac8ebee132d6a;p=ceph-ci.git 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 --- 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)