Log exception tracebacks

If undercloud install/upgrade fails because of an exception, the log
didn't contain a traceback, so if the exception wasn't obvious from the
message, it was practically impossible to tell where the exception came
from when looking at the logs. This commit adds traceback logging.

Change-Id: Ifbc273b9c5a7de42aed8093d563d514348ddeaa3
Closes-Bug: #1693805
This commit is contained in:
Jiri Stransky 2017-05-26 15:47:36 +02:00
parent f50ecef245
commit 5903151ff5
1 changed files with 1 additions and 0 deletions

View File

@ -1568,6 +1568,7 @@ def install(instack_root, upgrade=False):
_post_config(instack_env)
_run_command(['sudo', 'rm', '-f', '/tmp/svc-map-services'], None, 'rm')
except Exception as e:
LOG.debug("An exception occurred", exc_info=True)
LOG.error(FAILURE_MESSAGE,
{'undercloud_operation': undercloud_operation,
'exception': six.text_type(e),