Improve logging of AssertionErrors
Currently, when we have an assertion error raised from cmdlib, it looks like this: [cluster] root@node4:~# gnt-instance grow-disk instance1 0 1G Failure: command execution error: This is very very confusing. This patch adds a bit of traceback formatting to improve this as follows: [cluster] root@node4:~# gnt-instance grow-disk instance1 0 1G Failure: command execution error: Internal assertion error: please report this as a bug. Error message: ''; location: File "/usr/lib/python2.6/dist-packages/ganeti/cmdlib.py", line 11954, in CheckPrereq assert False This is not perfect, but at least it shows better what the problem is. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
Loading
Please register or sign in to comment