Log specific error message from RetriableConnectionFailure

There are more than one error from keystoneauth that can match
RetriableConnectionFailure. We retry on all of them, but logging the
whole message can be useful for debugging.

Change-Id: I2fd3bf62a3a755281d34ff5d3624b835281604fb
This commit is contained in:
Monty Taylor 2017-05-25 09:29:30 -05:00
parent 9f393dcbc8
commit bf8774b809
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594

View File

@ -108,10 +108,11 @@ class BaseTask(object):
# Keep time for connection retrying logging
start = time.time()
self.done(self.main(client))
except keystoneauth1.exceptions.RetriableConnectionFailure:
except keystoneauth1.exceptions.RetriableConnectionFailure as e:
end = time.time()
dt = end - start
if client.region_name:
client.log.debug(str(e))
client.log.debug(
"Connection failure on %(cloud)s:%(region)s"
" for %(name)s after %(secs)s seconds, retrying",