diff options
author | Paul Belanger <pabelanger@redhat.com> | 2019-01-21 12:39:53 -0500 |
---|---|---|
committer | Paul Belanger <pabelanger@redhat.com> | 2019-01-21 13:11:24 -0500 |
commit | 669e2d66fa720416e07c135cb3d1aebe1952332c (patch) | |
tree | f2e81720fda7f7a8680f074db63502f8d6c9f199 /zuul/lib/fingergw.py | |
parent | 691b1bc17c77ebce5b2a568e586d19b77cebbc7b (diff) | |
download | zuul-669e2d66fa720416e07c135cb3d1aebe1952332c.tar.gz |
Improve exception handling of fingerclient
This is to improve the following traceback, today we don't display what
server / port is.
Traceback (most recent call last):
File "/opt/venv/zuul-3.4.0/lib/python3.6/site-packages/zuul/lib/fingergw.py", line 80, in handle
build_uuid,
File "/opt/venv/zuul-3.4.0/lib/python3.6/site-packages/zuul/lib/fingergw.py", line 51, in _fingerClient
with socket.create_connection((server, port), timeout=10) as s:
File "/usr/lib/python3.6/socket.py", line 704, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
Change-Id: I2adb79b8fc3e12cb971b59e3d89c3dfc24a10a67
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Diffstat (limited to 'zuul/lib/fingergw.py')
-rw-r--r-- | zuul/lib/fingergw.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/zuul/lib/fingergw.py b/zuul/lib/fingergw.py index 4f603f324..38cc5ec64 100644 --- a/zuul/lib/fingergw.py +++ b/zuul/lib/fingergw.py @@ -81,7 +81,9 @@ class RequestHandler(streamer_utils.BaseFingerRequestHandler): except BrokenPipeError: # Client disconnect return except Exception: - self.log.exception('Finger request handling exception:') + self.log.exception( + 'Finger request handling exception (%s:%s):', + port_location['server'], port_location['port']) msg = 'Internal streaming error' self.request.sendall(msg.encode('utf-8')) return |