From 92bf396a6c68ac0048355e3c26f9be39e3d9d9ec Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 8 Jan 2021 10:08:04 -0800 Subject: [PATCH] orchestra: squelch Traceback for expected auth failures The Traceback clutters the log and messes up greps for Tracebacks. Signed-off-by: Patrick Donnelly --- teuthology/orchestra/connection.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/teuthology/orchestra/connection.py b/teuthology/orchestra/connection.py index eefede0c98..d9706b5959 100644 --- a/teuthology/orchestra/connection.py +++ b/teuthology/orchestra/connection.py @@ -104,8 +104,7 @@ def connect(user_at_host, host_key=None, keep_alive=False, timeout=60, try: ssh.connect(**connect_args) break - except paramiko.AuthenticationException: - log.exception( - "Error connecting to {host}".format(host=host)) + except paramiko.AuthenticationException as e: + log.error(f"Error authenticating with {host}: {str(e)}") ssh.get_transport().set_keepalive(keep_alive) return ssh -- 2.39.5