hail.rst 3.04 KB
Newer Older
1 2
HAIL(1) Ganeti | Version @GANETI_VERSION@
=========================================
3

4 5
NAME
----
6

7 8 9 10 11
hail - Ganeti IAllocator plugin

SYNOPSIS
--------

12
**hail** [ **-t** *datafile* | **--simulate** *spec* ] *input-file*
13 14 15 16 17

**hail** --version

DESCRIPTION
-----------
18 19 20

hail is a Ganeti IAllocator plugin that allows automatic instance
placement and automatic instance secondary node replacement using the
21
same algorithm as **hbal**(1).
22

23 24
The program takes input via a JSON-file containing current cluster
state and the request details, and output (on stdout) a JSON-formatted
25 26 27
response. In case of critical failures, the error message is printed
on stderr and the exit code is changed to show failure.

28 29
ALGORITHM
~~~~~~~~~
30 31 32 33 34 35 36

The program uses a simplified version of the hbal algorithm.

For relocations, we try to change the secondary node of the instance
to all the valid other nodes; the node which results in the best
cluster score is chosen.

37
For single-node allocations (non-mirrored instances), again we
Iustin Pop's avatar
Iustin Pop committed
38 39
select the node which, when chosen as the primary node, gives the best
score.
40

41 42
For dual-node allocations (mirrored instances), we chose the best
pair; this is the only choice where the algorithm is non-trivial
43 44
with regard to cluster size.

45
For node evacuations (*multi-evacuate* mode), we iterate over all
Iustin Pop's avatar
Iustin Pop committed
46 47 48 49
instances which live as secondaries on those nodes and try to relocate
them using the single-instance relocation algorithm.

In all cases, the cluster scoring is identical to the hbal algorithm.
50

51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
OPTIONS
-------

The options that can be passed to the program are as follows:

-p, --print-nodes
  Prints the before and after node status, in a format designed to
  allow the user to understand the node's most important
  parameters. See the man page **hbal**(1) for more details about this
  field.

-t *datafile*, --text-data=*datafile*
  The name of the file holding cluster information, to override the
  data in the JSON request itself. This is mostly used for debugging.

--simulate *description*
  Similar to the **-t** option, this allows overriding the cluster
  data with a simulated cluster. For details about the description,
  see the man page **hspace**(1).

71 72
CONFIGURATION
-------------
73 74 75 76 77

For the tag-exclusion configuration (see the manpage of hbal for more
details), the list of which instance tags to consider as exclusion
tags will be read from the cluster tags, configured as follows:

78
- get all cluster tags starting with **htools:iextags:**
79 80
- use their suffix as the prefix for exclusion tags

81 82
For example, given a cluster tag like **htools:iextags:service**,
all instance tags of the form **service:X** will be considered as
83
exclusion tags, meaning that (e.g.) two instances which both have a
84
tag **service:foo** will not be placed on the same primary node.
85

86 87 88 89 90
OPTIONS
-------

The options that can be passed to the program are as follows:

91 92
EXIT STATUS
-----------
93 94 95

The exist status of the command will be zero, unless for some reason
the algorithm fatally failed (e.g. wrong node or instance data).
96 97 98 99 100 101

.. vim: set textwidth=72 :
.. Local Variables:
.. mode: rst
.. fill-column: 72
.. End: