Statistics
| Branch: | Tag: | Revision:

root / man / hail.rst @ 4162995d

History | View | Annotate | Download (3.5 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** *file* | **--simulate** *spec* ] [options...] *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
-S *filename*, --save-cluster=*filename*
72
  If given, the state of the cluster before and the iallocator run is
73
  saved to a file named *filename.pre-ialloc*, respectively
74
  *filename.post-ialloc*. This allows re-feeding the cluster state to
75
  any of the htools utilities.
76

    
77
-v
78
  This option increases verbosity and can be used for debugging in order
79
  to understand how the IAllocator request is parsed; it can be passed
80
  multiple times for successively more information.
81

    
82

    
83
CONFIGURATION
84
-------------
85

    
86
For the tag-exclusion configuration (see the manpage of hbal for more
87
details), the list of which instance tags to consider as exclusion
88
tags will be read from the cluster tags, configured as follows:
89

    
90
- get all cluster tags starting with **htools:iextags:**
91
- use their suffix as the prefix for exclusion tags
92

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

    
98
OPTIONS
99
-------
100

    
101
The options that can be passed to the program are as follows:
102

    
103
EXIT STATUS
104
-----------
105

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

    
109
.. vim: set textwidth=72 :
110
.. Local Variables:
111
.. mode: rst
112
.. fill-column: 72
113
.. End: