From: Patrick Donnelly Date: Fri, 8 Jan 2021 18:08:04 +0000 (-0800) Subject: orchestra: squelch Traceback for expected auth failures X-Git-Tag: 1.1.0~22^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=92bf396a6c68ac0048355e3c26f9be39e3d9d9ec;p=teuthology.git orchestra: squelch Traceback for expected auth failures The Traceback clutters the log and messes up greps for Tracebacks. Signed-off-by: Patrick Donnelly --- diff --git a/teuthology/orchestra/connection.py b/teuthology/orchestra/connection.py index eefede0c9..d9706b595 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