Statistics
| Branch: | Tag: | Revision:

root / man / hail.rst @ 756df409

History | View | Annotate | Download (3.5 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 b790839a Iustin Pop
**hail** [ **-t** *file* | **--simulate** *spec* ] [options...] *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 4162995d Iustin Pop
-S *filename*, --save-cluster=*filename*
72 4162995d Iustin Pop
  If given, the state of the cluster before and the iallocator run is
73 4162995d Iustin Pop
  saved to a file named *filename.pre-ialloc*, respectively
74 4162995d Iustin Pop
  *filename.post-ialloc*. This allows re-feeding the cluster state to
75 4162995d Iustin Pop
  any of the htools utilities.
76 4162995d Iustin Pop
77 b790839a Iustin Pop
-v
78 b790839a Iustin Pop
  This option increases verbosity and can be used for debugging in order
79 b790839a Iustin Pop
  to understand how the IAllocator request is parsed; it can be passed
80 b790839a Iustin Pop
  multiple times for successively more information.
81 b790839a Iustin Pop
82 b790839a Iustin Pop
83 49148d15 Iustin Pop
CONFIGURATION
84 49148d15 Iustin Pop
-------------
85 73b2e389 Iustin Pop
86 73b2e389 Iustin Pop
For the tag-exclusion configuration (see the manpage of hbal for more
87 73b2e389 Iustin Pop
details), the list of which instance tags to consider as exclusion
88 73b2e389 Iustin Pop
tags will be read from the cluster tags, configured as follows:
89 73b2e389 Iustin Pop
90 49148d15 Iustin Pop
- get all cluster tags starting with **htools:iextags:**
91 73b2e389 Iustin Pop
- use their suffix as the prefix for exclusion tags
92 73b2e389 Iustin Pop
93 49148d15 Iustin Pop
For example, given a cluster tag like **htools:iextags:service**,
94 49148d15 Iustin Pop
all instance tags of the form **service:X** will be considered as
95 73b2e389 Iustin Pop
exclusion tags, meaning that (e.g.) two instances which both have a
96 49148d15 Iustin Pop
tag **service:foo** will not be placed on the same primary node.
97 73b2e389 Iustin Pop
98 01fec0a1 Iustin Pop
OPTIONS
99 01fec0a1 Iustin Pop
-------
100 01fec0a1 Iustin Pop
101 01fec0a1 Iustin Pop
The options that can be passed to the program are as follows:
102 01fec0a1 Iustin Pop
103 49148d15 Iustin Pop
EXIT STATUS
104 49148d15 Iustin Pop
-----------
105 c6702e5e Iustin Pop
106 c6702e5e Iustin Pop
The exist status of the command will be zero, unless for some reason
107 c6702e5e Iustin Pop
the algorithm fatally failed (e.g. wrong node or instance data).
108 9ff4f2c0 Michael Hanselmann
109 9ff4f2c0 Michael Hanselmann
.. vim: set textwidth=72 :
110 9ff4f2c0 Michael Hanselmann
.. Local Variables:
111 9ff4f2c0 Michael Hanselmann
.. mode: rst
112 9ff4f2c0 Michael Hanselmann
.. fill-column: 72
113 9ff4f2c0 Michael Hanselmann
.. End: