Merge pull request #30128 from oeuftete/fileclient-attempt-error-to-warning

Log retryable transport errors as warnings
This commit is contained in:
Mike Place 2016-01-04 12:15:31 -07:00
commit aeec21ea65

View File

@ -1097,12 +1097,17 @@ class RemoteClient(Client):
fn_.write(data)
except (TypeError, KeyError) as e:
transport_tries += 1
log.error('Data transport is broken, got: {0}, type: {1}, '
'exception: {2}, attempt {3} of 3'.format(
data, type(data), e, transport_tries)
)
log.warning('Data transport is broken, got: {0}, type: {1}, '
'exception: {2}, attempt {3} of 3'.format(
data, type(data), e, transport_tries)
)
self._refresh_channel()
if transport_tries > 3:
log.error('Data transport is broken, got: {0}, type: {1}, '
'exception: {2}, '
'Retry attempts exhausted'.format(
data, type(data), e)
)
break
if fn_: