Skip to content
Snippets Groups Projects
Commit b183c4a8 authored by Iustin Pop's avatar Iustin Pop
Browse files

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: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 1facaf11
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment