Statistics
| Branch: | Tag: | Revision:

root / man / hail.rst @ f183de56

History | View | Annotate | Download (4.1 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 implements the instance
20
placement and movement using the same algorithm as **hbal**(1).
21

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

    
27
If the input file name is ``-`` (a single minus sign), then the request
28
data will be read from *stdin*.
29

    
30
ALGORITHM
31
~~~~~~~~~
32

    
33
The program uses a simplified version of the hbal algorithm.
34

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

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

    
43
For relocations, we try to change the secondary node of the instance to
44
all the valid other nodes; the node which results in the best cluster
45
score is chosen.
46

    
47
For node changes (*change-node* mode), we currently support DRBD
48
instances only, and all three modes (primary changes, secondary changes
49
and all node changes).
50

    
51
For group moves (*change-group* mode), again only DRBD is supported, and
52
we compute the correct sequence that will result in a group change; job
53
failure mid-way will result in a split instance. The choice of node(s)
54
on the target group is based on the group score, and the choice of group
55
is based on the same algorithm as allocations (group with lowest score
56
after placement).
57

    
58
The deprecated *multi-evacuate* modes is no longer supported.
59

    
60
In all cases, the cluster (or group) scoring is identical to the hbal
61
algorithm.
62

    
63
OPTIONS
64
-------
65

    
66
The options that can be passed to the program are as follows:
67

    
68
-p, \--print-nodes
69
  Prints the before and after node status, in a format designed to allow
70
  the user to understand the node's most important parameters. See the
71
  man page **htools**(1) for more details about this option.
72

    
73
-t *datafile*, \--text-data=*datafile*
74
  The name of the file holding cluster information, to override the data
75
  in the JSON request itself. This is mostly used for debugging. The
76
  format of the file is described in the man page **htools**(1).
77

    
78
\--simulate *description*
79
  Backend specification: similar to the **-t** option, this allows
80
  overriding the cluster data with a simulated cluster. For details
81
  about the description, see the man page **htools**(1).
82

    
83
-S *filename*, \--save-cluster=*filename*
84
  If given, the state of the cluster before and the iallocator run is
85
  saved to a file named *filename.pre-ialloc*, respectively
86
  *filename.post-ialloc*. This allows re-feeding the cluster state to
87
  any of the htools utilities via the ``-t`` option.
88

    
89
-v
90
  This option increases verbosity and can be used for debugging in order
91
  to understand how the IAllocator request is parsed; it can be passed
92
  multiple times for successively more information.
93

    
94

    
95
CONFIGURATION
96
-------------
97

    
98
For the tag-exclusion configuration (see the manpage of hbal for more
99
details), the list of which instance tags to consider as exclusion
100
tags will be read from the cluster tags, configured as follows:
101

    
102
- get all cluster tags starting with **htools:iextags:**
103
- use their suffix as the prefix for exclusion tags
104

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

    
110
OPTIONS
111
-------
112

    
113
The options that can be passed to the program are as follows:
114

    
115
EXIT STATUS
116
-----------
117

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

    
121
.. vim: set textwidth=72 :
122
.. Local Variables:
123
.. mode: rst
124
.. fill-column: 72
125
.. End: