Statistics
| Branch: | Tag: | Revision:

root / man / hail.rst @ 5a19bd35

History | View | Annotate | Download (3 kB)

1
HAIL(1) Ganeti | Version @GANETI_VERSION@
2
=========================================
3

    
4
NAME
5
----
6

    
7
hail - Ganeti IAllocator plugin
8

    
9
SYNOPSIS
10
--------
11

    
12
**hail** [ **-t** *datafile* | **--simulate** *spec* ] *input-file*
13

    
14
**hail** --version
15

    
16
DESCRIPTION
17
-----------
18

    
19
hail is a Ganeti IAllocator plugin that allows automatic instance
20
placement and automatic instance secondary node replacement using the
21
same algorithm as **hbal**(1).
22

    
23
The program takes input via a JSON-file containing current cluster
24
state and the request details, and output (on stdout) a JSON-formatted
25
response. In case of critical failures, the error message is printed
26
on stderr and the exit code is changed to show failure.
27

    
28
ALGORITHM
29
~~~~~~~~~
30

    
31
The program uses a simplified version of the hbal algorithm.
32

    
33
For relocations, we try to change the secondary node of the instance
34
to all the valid other nodes; the node which results in the best
35
cluster score is chosen.
36

    
37
For single-node allocations (non-mirrored instances), again we
38
select the node which, when chosen as the primary node, gives the best
39
score.
40

    
41
For dual-node allocations (mirrored instances), we chose the best
42
pair; this is the only choice where the algorithm is non-trivial
43
with regard to cluster size.
44

    
45
For node evacuations (*multi-evacuate* mode), we iterate over all
46
instances which live as secondaries on those nodes and try to relocate
47
them using the single-instance relocation algorithm.
48

    
49
In all cases, the cluster scoring is identical to the hbal algorithm.
50

    
51
OPTIONS
52
-------
53

    
54
The options that can be passed to the program are as follows:
55

    
56
-p, --print-nodes
57
  Prints the before and after node status, in a format designed to
58
  allow the user to understand the node's most important
59
  parameters. See the man page **hbal**(1) for more details about this
60
  field.
61

    
62
-t *datafile*, --text-data=*datafile*
63
  The name of the file holding cluster information, to override the
64
  data in the JSON request itself. This is mostly used for debugging.
65

    
66
--simulate *description*
67
  Similar to the **-t** option, this allows overriding the cluster
68
  data with a simulated cluster. For details about the description,
69
  see the man page **hspace**(1).
70

    
71
CONFIGURATION
72
-------------
73

    
74
For the tag-exclusion configuration (see the manpage of hbal for more
75
details), the list of which instance tags to consider as exclusion
76
tags will be read from the cluster tags, configured as follows:
77

    
78
- get all cluster tags starting with **htools:iextags:**
79
- use their suffix as the prefix for exclusion tags
80

    
81
For example, given a cluster tag like **htools:iextags:service**,
82
all instance tags of the form **service:X** will be considered as
83
exclusion tags, meaning that (e.g.) two instances which both have a
84
tag **service:foo** will not be placed on the same primary node.
85

    
86
OPTIONS
87
-------
88

    
89
The options that can be passed to the program are as follows:
90

    
91
EXIT STATUS
92
-----------
93

    
94
The exist status of the command will be zero, unless for some reason
95
the algorithm fatally failed (e.g. wrong node or instance data).