diff --git a/htools/Ganeti/HTools/Program/Hbal.hs b/htools/Ganeti/HTools/Program/Hbal.hs index c6cb6299874dbb229c0bedafc25d88f072940f1f..d9b47f03ab4bd3464df08330be32b716ce6d71dd 100644 --- a/htools/Ganeti/HTools/Program/Hbal.hs +++ b/htools/Ganeti/HTools/Program/Hbal.hs @@ -180,7 +180,7 @@ execWrapper master nl il cref alljss = do then do hPrintf stderr "Exiting early due to user request, %d\ \ jobset(s) remaining." (length alljss)::IO () - return False + return True else execJobSet master nl il cref alljss -- | Execute an entire jobset. diff --git a/man/hbal.rst b/man/hbal.rst index 2cda02f85636426b019c9a3988e92658aa15236e..0c50d995fd64ab18b965cfda6c3bbbb5e267866c 100644 --- a/man/hbal.rst +++ b/man/hbal.rst @@ -415,9 +415,15 @@ EXIT STATUS ----------- The exit status of the command will be zero, unless for some reason the -algorithm fatally failed (e.g. wrong node or instance data), or (in case -of job execution) either one of the jobs has failed or the balancing was -interrupted early. +algorithm failed (e.g. wrong node or instance data), invalid command +line options, or (in case of job execution) one of the jobs has failed. + +Once job execution via Luxi has started (``-X``), if the balancing was +interrupted early (via *SIGINT*, or via ``--max-length``) but all jobs +executed successfully, then the exit status is zero; a non-zero exit +code means that the cluster state should be investigated, since a job +failed or we couldn't compute its status and this can also point to a +problem on the Ganeti side. BUGS ----