Log the exception-info when an error raises in hanlder

on the line #114 we set the liveness probe to False, which triggers
restart of the Kuryr Controller.

However without DEBUG, the LOG message is hidden behind DEBUG.

This makes it harder to troubleshoot if the Handler failed with this
exception

Change-Id: I71deb8434273ce39453d69a05d6bd8b105fe2c2b
This commit is contained in:
Robin Cernin 2021-09-29 15:14:28 +10:00
parent deb055190f
commit d9460a5e0f
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,8 @@ class Retry(base.EventHandler):
if self._sleep(deadline, attempt, ex.value):
ex.reraise = False
else:
LOG.debug('Report handler unhealthy %s', self._handler)
LOG.exception('Report handler unhealthy %s',
self._handler)
self._handler.set_liveness(alive=False, exc=ex.value)
except Exception as ex:
LOG.exception('Report handler unhealthy %s', self._handler)