Merge lp://staging/~nuclearbob/utah/ssh-stacktrace into lp://staging/utah

Proposed by Max Brustkern
Status: Merged
Merged at revision: 987
Proposed branch: lp://staging/~nuclearbob/utah/ssh-stacktrace
Merge into: lp://staging/utah
Diff against target: 90 lines (+12/-0)
1 file modified
utah/provisioning/ssh.py (+12/-0)
To merge this branch: bzr merge lp://staging/~nuclearbob/utah/ssh-stacktrace
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
Review via email: mp+178777@code.staging.launchpad.net

Description of the change

I added stacktrace logging for external failures for ssh connections. When I run this command to connect to a machine that doesn't exist:
PYTHONPATH=. ./examples/run_utah_tests.py --skip-provisioning --name blarg /usr/share/utah/client/examples/pass.run
I get this:
2013-08-06 10:52:01,780 ssh INFO: Checking for ssh availability
2013-08-06 10:52:01,781 ssh DEBUG: Traceback (most recent call last):
  File "/home/max/bzr/utah/utah/provisioning/ssh.py", line 316, in sshcheck
    key_filename=config.sshprivatekey)
  File "/usr/lib/python2.7/dist-packages/paramiko/client.py", line 282, in connect
    for (family, socktype, proto, canonname, sockaddr) in socket.getaddrinfo(hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM):
gaierror: [Errno -2] Name or service not known

2013-08-06 10:52:01,781 ssh DEBUG: Caught [Errno -2] Name or service not known, retrying sshcheck() in 3 seconds

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) :
review: Approve
987. By Andy Doan

Logging stacktraces for SSH failures

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches