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