Statistics
| Branch: | Tag: | Revision:

root / man / hail.rst @ 896a03f6

History | View | Annotate | Download (3.7 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 5b53ca79 Iustin Pop
hail is a Ganeti IAllocator plugin that implements the instance
20 5b53ca79 Iustin Pop
placement and movement using the same algorithm as **hbal**(1).
21 c6702e5e Iustin Pop
22 49148d15 Iustin Pop
The program takes input via a JSON-file containing current cluster
23 49148d15 Iustin Pop
state and the request details, and output (on stdout) a JSON-formatted
24 c6702e5e Iustin Pop
response. In case of critical failures, the error message is printed
25 c6702e5e Iustin Pop
on stderr and the exit code is changed to show failure.
26 c6702e5e Iustin Pop
27 49148d15 Iustin Pop
ALGORITHM
28 49148d15 Iustin Pop
~~~~~~~~~
29 c6702e5e Iustin Pop
30 c6702e5e Iustin Pop
The program uses a simplified version of the hbal algorithm.
31 c6702e5e Iustin Pop
32 49148d15 Iustin Pop
For single-node allocations (non-mirrored instances), again we
33 1cd133d6 Iustin Pop
select the node which, when chosen as the primary node, gives the best
34 1cd133d6 Iustin Pop
score.
35 c6702e5e Iustin Pop
36 49148d15 Iustin Pop
For dual-node allocations (mirrored instances), we chose the best
37 49148d15 Iustin Pop
pair; this is the only choice where the algorithm is non-trivial
38 c6702e5e Iustin Pop
with regard to cluster size.
39 c6702e5e Iustin Pop
40 5b53ca79 Iustin Pop
For node changes (*change-node* mode), we currently support DRBD
41 5b53ca79 Iustin Pop
instances only, and all three modes (primary changes, secondary changes
42 5b53ca79 Iustin Pop
and all node changes).
43 5b53ca79 Iustin Pop
44 5b53ca79 Iustin Pop
For group moves (*change-group* mode), again only DRBD is supported, and
45 5b53ca79 Iustin Pop
we compute the correct sequence that will result in a group change; job
46 5b53ca79 Iustin Pop
failure mid-way will result in a split instance. The choice of node(s)
47 5b53ca79 Iustin Pop
on the target group is based on the group score, and the choice of group
48 5b53ca79 Iustin Pop
is based on the same algorithm as allocations (group with lowest score
49 5b53ca79 Iustin Pop
after placement).
50 5b53ca79 Iustin Pop
51 5b53ca79 Iustin Pop
The deprecated *relocate* and *multi-evacuate* modes are no longer
52 5b53ca79 Iustin Pop
supported.
53 d06d0636 Iustin Pop
54 5b53ca79 Iustin Pop
In all cases, the cluster (or group) scoring is identical to the hbal
55 5b53ca79 Iustin Pop
algorithm.
56 c6702e5e Iustin Pop
57 01fec0a1 Iustin Pop
OPTIONS
58 01fec0a1 Iustin Pop
-------
59 01fec0a1 Iustin Pop
60 01fec0a1 Iustin Pop
The options that can be passed to the program are as follows:
61 01fec0a1 Iustin Pop
62 01fec0a1 Iustin Pop
-p, --print-nodes
63 d7731f51 Iustin Pop
  Prints the before and after node status, in a format designed to allow
64 d7731f51 Iustin Pop
  the user to understand the node's most important parameters. See the
65 d7731f51 Iustin Pop
  man page **htools**(1) for more details about this option.
66 01fec0a1 Iustin Pop
67 01fec0a1 Iustin Pop
-t *datafile*, --text-data=*datafile*
68 01fec0a1 Iustin Pop
  The name of the file holding cluster information, to override the
69 01fec0a1 Iustin Pop
  data in the JSON request itself. This is mostly used for debugging.
70 01fec0a1 Iustin Pop
71 01fec0a1 Iustin Pop
--simulate *description*
72 01fec0a1 Iustin Pop
  Similar to the **-t** option, this allows overriding the cluster
73 01fec0a1 Iustin Pop
  data with a simulated cluster. For details about the description,
74 01fec0a1 Iustin Pop
  see the man page **hspace**(1).
75 01fec0a1 Iustin Pop
76 4162995d Iustin Pop
-S *filename*, --save-cluster=*filename*
77 4162995d Iustin Pop
  If given, the state of the cluster before and the iallocator run is
78 4162995d Iustin Pop
  saved to a file named *filename.pre-ialloc*, respectively
79 4162995d Iustin Pop
  *filename.post-ialloc*. This allows re-feeding the cluster state to
80 4162995d Iustin Pop
  any of the htools utilities.
81 4162995d Iustin Pop
82 b790839a Iustin Pop
-v
83 b790839a Iustin Pop
  This option increases verbosity and can be used for debugging in order
84 b790839a Iustin Pop
  to understand how the IAllocator request is parsed; it can be passed
85 b790839a Iustin Pop
  multiple times for successively more information.
86 b790839a Iustin Pop
87 b790839a Iustin Pop
88 49148d15 Iustin Pop
CONFIGURATION
89 49148d15 Iustin Pop
-------------
90 73b2e389 Iustin Pop
91 73b2e389 Iustin Pop
For the tag-exclusion configuration (see the manpage of hbal for more
92 73b2e389 Iustin Pop
details), the list of which instance tags to consider as exclusion
93 73b2e389 Iustin Pop
tags will be read from the cluster tags, configured as follows:
94 73b2e389 Iustin Pop
95 49148d15 Iustin Pop
- get all cluster tags starting with **htools:iextags:**
96 73b2e389 Iustin Pop
- use their suffix as the prefix for exclusion tags
97 73b2e389 Iustin Pop
98 49148d15 Iustin Pop
For example, given a cluster tag like **htools:iextags:service**,
99 49148d15 Iustin Pop
all instance tags of the form **service:X** will be considered as
100 73b2e389 Iustin Pop
exclusion tags, meaning that (e.g.) two instances which both have a
101 49148d15 Iustin Pop
tag **service:foo** will not be placed on the same primary node.
102 73b2e389 Iustin Pop
103 01fec0a1 Iustin Pop
OPTIONS
104 01fec0a1 Iustin Pop
-------
105 01fec0a1 Iustin Pop
106 01fec0a1 Iustin Pop
The options that can be passed to the program are as follows:
107 01fec0a1 Iustin Pop
108 49148d15 Iustin Pop
EXIT STATUS
109 49148d15 Iustin Pop
-----------
110 c6702e5e Iustin Pop
111 c6702e5e Iustin Pop
The exist status of the command will be zero, unless for some reason
112 c6702e5e Iustin Pop
the algorithm fatally failed (e.g. wrong node or instance data).
113 9ff4f2c0 Michael Hanselmann
114 9ff4f2c0 Michael Hanselmann
.. vim: set textwidth=72 :
115 9ff4f2c0 Michael Hanselmann
.. Local Variables:
116 9ff4f2c0 Michael Hanselmann
.. mode: rst
117 9ff4f2c0 Michael Hanselmann
.. fill-column: 72
118 9ff4f2c0 Michael Hanselmann
.. End: