Revision 2b634302 man/hbal.rst

b/man/hbal.rst
362 362
  jobset will be executed in parallel. The jobsets themselves are
363 363
  executed serially.
364 364

  
365
  The execution of the job series can be interrupted, see below for
366
  signal handling.
367

  
365 368
-l *N*, --max-length=*N*
366 369
  Restrict the solution to this length. This can be used for example
367 370
  to automate the execution of the balancing.
......
399 402
-V, --version
400 403
  Just show the program version and exit.
401 404

  
405
SIGNAL HANDLING
406
---------------
407

  
408
When executing jobs via LUXI (using the ``-X`` option), normally hbal
409
will execute all jobs until either one errors out or all the jobs finish
410
successfully.
411

  
412
Since balancing can take a long time, it is possible to stop hbal early
413
in two ways:
414

  
415
- by sending a ``SIGINT`` (``^C``), hbal will register the termination
416
  request, and will wait until the currently submitted jobs finish, at
417
  which point it will exit (with exit code 1)
418
- by sending a ``SIGTERM``, hbal will immediately exit (with exit code
419
  2); it is the responsibility of the user to follow up with Ganeti the
420
  result of the currently-executing jobs
421

  
422
Note that in any situation, it's perfectly safe to kill hbal, either via
423
the above signals or via any other signal (e.g. ``SIGQUIT``,
424
``SIGKILL``), since the jobs themselves are processed by Ganeti whereas
425
hbal (after submission) only watches their progression. In this case,
426
the use will again have to query Ganeti for job results.
427

  
402 428
EXIT STATUS
403 429
-----------
404 430

  
405
The exit status of the command will be zero, unless for some reason
406
the algorithm fatally failed (e.g. wrong node or instance data), or
407
(in case of job execution) any job has failed.
431
The exit status of the command will be zero, unless for some reason the
432
algorithm fatally failed (e.g. wrong node or instance data), or (in case
433
of job execution) either one of the jobs has failed or the balancing was
434
interrupted early.
408 435

  
409 436
BUGS
410 437
----
411 438

  
412
The program does not check its input data for consistency, and aborts
413
with cryptic errors messages in this case.
439
The program does not check all its input data for consistency, and
440
sometime aborts with cryptic errors messages with invalid data.
414 441

  
415 442
The algorithm is not perfect.
416 443

  
417
The output format is not easily scriptable, and the program should
418
feed moves directly into Ganeti (either via RAPI or via a gnt-debug
419
input file).
420

  
421 444
EXAMPLE
422 445
-------
423 446

  

Also available in: Unified diff