Statistics
| Branch: | Tag: | Revision:

root / man / hail.rst @ d1e9c98d

History | View | Annotate | Download (3 kB)

1 5a19bd35 Iustin Pop
HAIL(1) Ganeti | Version @GANETI_VERSION@
2 5a19bd35 Iustin Pop
=========================================
3 c6702e5e Iustin Pop
4 49148d15 Iustin Pop
NAME
5 49148d15 Iustin Pop
----
6 c6702e5e Iustin Pop
7 49148d15 Iustin Pop
hail - Ganeti IAllocator plugin
8 49148d15 Iustin Pop
9 49148d15 Iustin Pop
SYNOPSIS
10 49148d15 Iustin Pop
--------
11 49148d15 Iustin Pop
12 01fec0a1 Iustin Pop
**hail** [ **-t** *datafile* | **--simulate** *spec* ] *input-file*
13 49148d15 Iustin Pop
14 49148d15 Iustin Pop
**hail** --version
15 49148d15 Iustin Pop
16 49148d15 Iustin Pop
DESCRIPTION
17 49148d15 Iustin Pop
-----------
18 c6702e5e Iustin Pop
19 c6702e5e Iustin Pop
hail is a Ganeti IAllocator plugin that allows automatic instance
20 c6702e5e Iustin Pop
placement and automatic instance secondary node replacement using the
21 49148d15 Iustin Pop
same algorithm as **hbal**(1).
22 c6702e5e Iustin Pop
23 49148d15 Iustin Pop
The program takes input via a JSON-file containing current cluster
24 49148d15 Iustin Pop
state and the request details, and output (on stdout) a JSON-formatted
25 c6702e5e Iustin Pop
response. In case of critical failures, the error message is printed
26 c6702e5e Iustin Pop
on stderr and the exit code is changed to show failure.
27 c6702e5e Iustin Pop
28 49148d15 Iustin Pop
ALGORITHM
29 49148d15 Iustin Pop
~~~~~~~~~
30 c6702e5e Iustin Pop
31 c6702e5e Iustin Pop
The program uses a simplified version of the hbal algorithm.
32 c6702e5e Iustin Pop
33 c6702e5e Iustin Pop
For relocations, we try to change the secondary node of the instance
34 c6702e5e Iustin Pop
to all the valid other nodes; the node which results in the best
35 c6702e5e Iustin Pop
cluster score is chosen.
36 c6702e5e Iustin Pop
37 49148d15 Iustin Pop
For single-node allocations (non-mirrored instances), again we
38 1cd133d6 Iustin Pop
select the node which, when chosen as the primary node, gives the best
39 1cd133d6 Iustin Pop
score.
40 c6702e5e Iustin Pop
41 49148d15 Iustin Pop
For dual-node allocations (mirrored instances), we chose the best
42 49148d15 Iustin Pop
pair; this is the only choice where the algorithm is non-trivial
43 c6702e5e Iustin Pop
with regard to cluster size.
44 c6702e5e Iustin Pop
45 49148d15 Iustin Pop
For node evacuations (*multi-evacuate* mode), we iterate over all
46 d06d0636 Iustin Pop
instances which live as secondaries on those nodes and try to relocate
47 d06d0636 Iustin Pop
them using the single-instance relocation algorithm.
48 d06d0636 Iustin Pop
49 d06d0636 Iustin Pop
In all cases, the cluster scoring is identical to the hbal algorithm.
50 c6702e5e Iustin Pop
51 01fec0a1 Iustin Pop
OPTIONS
52 01fec0a1 Iustin Pop
-------
53 01fec0a1 Iustin Pop
54 01fec0a1 Iustin Pop
The options that can be passed to the program are as follows:
55 01fec0a1 Iustin Pop
56 01fec0a1 Iustin Pop
-p, --print-nodes
57 01fec0a1 Iustin Pop
  Prints the before and after node status, in a format designed to
58 01fec0a1 Iustin Pop
  allow the user to understand the node's most important
59 01fec0a1 Iustin Pop
  parameters. See the man page **hbal**(1) for more details about this
60 01fec0a1 Iustin Pop
  field.
61 01fec0a1 Iustin Pop
62 01fec0a1 Iustin Pop
-t *datafile*, --text-data=*datafile*
63 01fec0a1 Iustin Pop
  The name of the file holding cluster information, to override the
64 01fec0a1 Iustin Pop
  data in the JSON request itself. This is mostly used for debugging.
65 01fec0a1 Iustin Pop
66 01fec0a1 Iustin Pop
--simulate *description*
67 01fec0a1 Iustin Pop
  Similar to the **-t** option, this allows overriding the cluster
68 01fec0a1 Iustin Pop
  data with a simulated cluster. For details about the description,
69 01fec0a1 Iustin Pop
  see the man page **hspace**(1).
70 01fec0a1 Iustin Pop
71 49148d15 Iustin Pop
CONFIGURATION
72 49148d15 Iustin Pop
-------------
73 73b2e389 Iustin Pop
74 73b2e389 Iustin Pop
For the tag-exclusion configuration (see the manpage of hbal for more
75 73b2e389 Iustin Pop
details), the list of which instance tags to consider as exclusion
76 73b2e389 Iustin Pop
tags will be read from the cluster tags, configured as follows:
77 73b2e389 Iustin Pop
78 49148d15 Iustin Pop
- get all cluster tags starting with **htools:iextags:**
79 73b2e389 Iustin Pop
- use their suffix as the prefix for exclusion tags
80 73b2e389 Iustin Pop
81 49148d15 Iustin Pop
For example, given a cluster tag like **htools:iextags:service**,
82 49148d15 Iustin Pop
all instance tags of the form **service:X** will be considered as
83 73b2e389 Iustin Pop
exclusion tags, meaning that (e.g.) two instances which both have a
84 49148d15 Iustin Pop
tag **service:foo** will not be placed on the same primary node.
85 73b2e389 Iustin Pop
86 01fec0a1 Iustin Pop
OPTIONS
87 01fec0a1 Iustin Pop
-------
88 01fec0a1 Iustin Pop
89 01fec0a1 Iustin Pop
The options that can be passed to the program are as follows:
90 01fec0a1 Iustin Pop
91 49148d15 Iustin Pop
EXIT STATUS
92 49148d15 Iustin Pop
-----------
93 c6702e5e Iustin Pop
94 c6702e5e Iustin Pop
The exist status of the command will be zero, unless for some reason
95 c6702e5e Iustin Pop
the algorithm fatally failed (e.g. wrong node or instance data).