]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
orchestra: squelch Traceback for expected auth failures 1595/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 8 Jan 2021 18:08:04 +0000 (10:08 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 8 Jan 2021 18:08:04 +0000 (10:08 -0800)
The Traceback clutters the log and messes up greps for Tracebacks.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
teuthology/orchestra/connection.py

index eefede0c988c0e98f2f582d2d662198e6edf57d1..d9706b59599d6dc98fbb6a37ae50245d28fb384d 100644 (file)
@@ -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