Statistics
| Branch: | Tag: | Revision:

root / man / hail.rst @ d7731f51

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 allow
58
  the user to understand the node's most important parameters. See the
59
  man page **htools**(1) for more details about this option.
60

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

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

    
70
-S *filename*, --save-cluster=*filename*
71
  If given, the state of the cluster before and the iallocator run is
72
  saved to a file named *filename.pre-ialloc*, respectively
73
  *filename.post-ialloc*. This allows re-feeding the cluster state to
74
  any of the htools utilities.
75

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

    
81

    
82
CONFIGURATION
83
-------------
84

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

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

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

    
97
OPTIONS
98
-------
99

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

    
102
EXIT STATUS
103
-----------
104

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

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