| Branch: | Tag: | Revision:

root / man / hail.rst @ 54f834df

History | View | Annotate | Download (4 kB)

1 5a19bd35 Iustin Pop
HAIL(1) Ganeti | Version @GANETI_VERSION@
2 5a19bd35 Iustin Pop
3 c6702e5e Iustin Pop
4 49148d15 Iustin Pop
5 49148d15 Iustin Pop
6 c6702e5e Iustin Pop
7 49148d15 Iustin Pop
hail - Ganeti IAllocator plugin
8 49148d15 Iustin Pop
9 49148d15 Iustin Pop
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
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
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
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 88df1fa9 Iustin Pop
For relocations, we try to change the secondary node of the instance to
41 88df1fa9 Iustin Pop
all the valid other nodes; the node which results in the best cluster
42 88df1fa9 Iustin Pop
score is chosen.
43 88df1fa9 Iustin Pop
44 5b53ca79 Iustin Pop
For node changes (*change-node* mode), we currently support DRBD
45 5b53ca79 Iustin Pop
instances only, and all three modes (primary changes, secondary changes
46 5b53ca79 Iustin Pop
and all node changes).
47 5b53ca79 Iustin Pop
48 5b53ca79 Iustin Pop
For group moves (*change-group* mode), again only DRBD is supported, and
49 5b53ca79 Iustin Pop
we compute the correct sequence that will result in a group change; job
50 5b53ca79 Iustin Pop
failure mid-way will result in a split instance. The choice of node(s)
51 5b53ca79 Iustin Pop
on the target group is based on the group score, and the choice of group
52 5b53ca79 Iustin Pop
is based on the same algorithm as allocations (group with lowest score
53 5b53ca79 Iustin Pop
after placement).
54 5b53ca79 Iustin Pop
55 88df1fa9 Iustin Pop
The deprecated *multi-evacuate* modes is no longer supported.
56 d06d0636 Iustin Pop
57 5b53ca79 Iustin Pop
In all cases, the cluster (or group) scoring is identical to the hbal
58 5b53ca79 Iustin Pop
59 c6702e5e Iustin Pop
60 01fec0a1 Iustin Pop
61 01fec0a1 Iustin Pop
62 01fec0a1 Iustin Pop
63 01fec0a1 Iustin Pop
The options that can be passed to the program are as follows:
64 01fec0a1 Iustin Pop
65 01fec0a1 Iustin Pop
-p, --print-nodes
66 d7731f51 Iustin Pop
  Prints the before and after node status, in a format designed to allow
67 d7731f51 Iustin Pop
  the user to understand the node's most important parameters. See the
68 d7731f51 Iustin Pop
  man page **htools**(1) for more details about this option.
69 01fec0a1 Iustin Pop
70 01fec0a1 Iustin Pop
-t *datafile*, --text-data=*datafile*
71 acd9fa11 Iustin Pop
  The name of the file holding cluster information, to override the data
72 acd9fa11 Iustin Pop
  in the JSON request itself. This is mostly used for debugging. The
73 acd9fa11 Iustin Pop
  format of the file is described in the man page **htools**(1).
74 01fec0a1 Iustin Pop
75 01fec0a1 Iustin Pop
--simulate *description*
76 acd9fa11 Iustin Pop
  Backend specification: similar to the **-t** option, this allows
77 acd9fa11 Iustin Pop
  overriding the cluster data with a simulated cluster. For details
78 acd9fa11 Iustin Pop
  about the description, see the man page **htools**(1).
79 01fec0a1 Iustin Pop
80 4162995d Iustin Pop
-S *filename*, --save-cluster=*filename*
81 4162995d Iustin Pop
  If given, the state of the cluster before and the iallocator run is
82 4162995d Iustin Pop
  saved to a file named *filename.pre-ialloc*, respectively
83 4162995d Iustin Pop
  **. This allows re-feeding the cluster state to
84 acd9fa11 Iustin Pop
  any of the htools utilities via the ``-t`` option.
85 4162995d Iustin Pop
86 b790839a Iustin Pop
87 b790839a Iustin Pop
  This option increases verbosity and can be used for debugging in order
88 b790839a Iustin Pop
  to understand how the IAllocator request is parsed; it can be passed
89 b790839a Iustin Pop
  multiple times for successively more information.
90 b790839a Iustin Pop
91 b790839a Iustin Pop
92 49148d15 Iustin Pop
93 49148d15 Iustin Pop
94 73b2e389 Iustin Pop
95 73b2e389 Iustin Pop
For the tag-exclusion configuration (see the manpage of hbal for more
96 73b2e389 Iustin Pop
details), the list of which instance tags to consider as exclusion
97 73b2e389 Iustin Pop
tags will be read from the cluster tags, configured as follows:
98 73b2e389 Iustin Pop
99 49148d15 Iustin Pop
- get all cluster tags starting with **htools:iextags:**
100 73b2e389 Iustin Pop
- use their suffix as the prefix for exclusion tags
101 73b2e389 Iustin Pop
102 49148d15 Iustin Pop
For example, given a cluster tag like **htools:iextags:service**,
103 49148d15 Iustin Pop
all instance tags of the form **service:X** will be considered as
104 73b2e389 Iustin Pop
exclusion tags, meaning that (e.g.) two instances which both have a
105 49148d15 Iustin Pop
tag **service:foo** will not be placed on the same primary node.
106 73b2e389 Iustin Pop
107 01fec0a1 Iustin Pop
108 01fec0a1 Iustin Pop
109 01fec0a1 Iustin Pop
110 01fec0a1 Iustin Pop
The options that can be passed to the program are as follows:
111 01fec0a1 Iustin Pop
112 49148d15 Iustin Pop
113 49148d15 Iustin Pop
114 c6702e5e Iustin Pop
115 c6702e5e Iustin Pop
The exist status of the command will be zero, unless for some reason
116 c6702e5e Iustin Pop
the algorithm fatally failed (e.g. wrong node or instance data).
117 9ff4f2c0 Michael Hanselmann
118 9ff4f2c0 Michael Hanselmann
.. vim: set textwidth=72 :
119 9ff4f2c0 Michael Hanselmann
.. Local Variables:
120 9ff4f2c0 Michael Hanselmann
.. mode: rst
121 9ff4f2c0 Michael Hanselmann
.. fill-column: 72
122 9ff4f2c0 Michael Hanselmann
.. End: