« Previous | Next » 

Revision 2a2e2610

Parent cad0723b
Child b69437c5

Added by Iustin Pop about 12 years ago

hbal: return exit status 0 in case of early exit

This derives from an internal bug, but the story is consistent across
both internal and external usage of hbal.

Basically right now, hbal returns exit code 1 if requested to exit
early, even if all jobs are successful. This is counter-intuitive due
to two reasons:

- hbal did what it was requested (exit early), so it shouldn't return error
- there were no job failures, so there's nothing to "cleanup" or
investigate on the Ganeti cluster, so again it shouldn't return

Therefore the new behaviour is as follows:

- for cases where all jobs were successful, even if terminated early
via SIGINT or via --limit, we exit with code 0
- for cases where jobs have failed or there were other errors in
running hbal, the exit code is 1
- for cases were hbal is requested an immediate termination (SIGTERM),
exit code is 2, denoting "unknown whether the Ganeti cluster is
consistent or not"

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences