« Previous | Next » 

Revision b183c4a8

IDb183c4a832f63021a94edf2fa017d4b7c634d7ff
Parent 1facaf11
Child 68e2ed87

Added by Iustin Pop over 11 years ago

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 <>
Reviewed-by: Michael Hanselmann <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences