hail.rst 5.34 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** *file* | **\--simulate** *spec* ] [options...] *input-file*
13

14
**hail** \--version
15 16 17

DESCRIPTION
-----------
18

19
hail is a Ganeti IAllocator plugin that implements the instance
20
placement and movement using the same algorithm as **hbal**\(1).
21

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

27 28 29
If the input file name is ``-`` (a single minus sign), then the request
data will be read from *stdin*.

30 31 32 33
Apart from input data, hail collects data over the network from all
MonDs with the --mond option. Currently it uses only data produced by
the CPUload collector.

34 35
ALGORITHM
~~~~~~~~~
36 37 38

The program uses a simplified version of the hbal algorithm.

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

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

47 48 49 50
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.

51 52 53 54 55 56 57 58 59 60 61
For node changes (*change-node* mode), we currently support DRBD
instances only, and all three modes (primary changes, secondary changes
and all node changes).

For group moves (*change-group* mode), again only DRBD is supported, and
we compute the correct sequence that will result in a group change; job
failure mid-way will result in a split instance. The choice of node(s)
on the target group is based on the group score, and the choice of group
is based on the same algorithm as allocations (group with lowest score
after placement).

62
The deprecated *multi-evacuate* modes is no longer supported.
Iustin Pop's avatar
Iustin Pop committed
63

64 65
In all cases, the cluster (or group) scoring is identical to the hbal
algorithm.
66

67 68 69 70 71
OPTIONS
-------

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

72
-p, \--print-nodes
73 74
  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
75
  man page **htools**\(1) for more details about this option.
76

77
-t *datafile*, \--text-data=*datafile*
Iustin Pop's avatar
Iustin Pop committed
78 79
  The name of the file holding cluster information, to override the data
  in the JSON request itself. This is mostly used for debugging. The
80
  format of the file is described in the man page **htools**\(1).
81

82
\--mond=*yes|no*
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
  If given the program will query all MonDs to fetch data from the
  supported data collectors over the network.

\--mond-data *datafile*
  The name of the file holding the data provided by MonD, to override
  quering MonDs over the network. This is mostly used for debugging. The
  file must be in JSON format and present an array of JSON objects ,
  one for every node, with two members. The first member named ``node``
  is the name of the node and the second member named ``reports`` is an
  array of report objects. The report objects must be in the same format
  as produced by the monitoring agent.

\--ignore-dynu
  If given, all dynamic utilisation information will be ignored by
  assuming it to be 0. This option will take precedence over any data
  passed by the MonDs with the ``--mond`` and the ``--mond-data``
  option.

101
\--simulate *description*
Iustin Pop's avatar
Iustin Pop committed
102 103
  Backend specification: similar to the **-t** option, this allows
  overriding the cluster data with a simulated cluster. For details
104
  about the description, see the man page **htools**\(1).
105

106
-S *filename*, \--save-cluster=*filename*
107 108 109
  If given, the state of the cluster before and the iallocator run is
  saved to a file named *filename.pre-ialloc*, respectively
  *filename.post-ialloc*. This allows re-feeding the cluster state to
Iustin Pop's avatar
Iustin Pop committed
110
  any of the htools utilities via the ``-t`` option.
111

112 113 114 115 116 117
-v
  This option increases verbosity and can be used for debugging in order
  to understand how the IAllocator request is parsed; it can be passed
  multiple times for successively more information.


118 119
CONFIGURATION
-------------
120 121 122 123 124

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:

125
- get all cluster tags starting with **htools:iextags:**
126 127
- use their suffix as the prefix for exclusion tags

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

133 134 135 136 137
OPTIONS
-------

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

138 139
EXIT STATUS
-----------
140 141 142

The exist status of the command will be zero, unless for some reason
the algorithm fatally failed (e.g. wrong node or instance data).
143

144 145 146 147 148 149 150 151
BUGS
----

Networks (as configured by **gnt-network**\(8)) are not taken into
account in Ganeti 2.7. The only way to guarantee that they work
correctly is having your networks connected to all nodegroups. This will
be fixed in a future version.

152 153 154 155 156
.. vim: set textwidth=72 :
.. Local Variables:
.. mode: rst
.. fill-column: 72
.. End: