Statistics
| Branch: | Tag: | Revision:

root / man / hail.rst @ f624fa95

History | View | Annotate | Download (4 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
ALGORITHM
28
~~~~~~~~~
29

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

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

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

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

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

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

    
55
The deprecated *multi-evacuate* modes is no longer supported.
56

    
57
In all cases, the cluster (or group) scoring is identical to the hbal
58
algorithm.
59

    
60
OPTIONS
61
-------
62

    
63
The options that can be passed to the program are as follows:
64

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

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

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

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

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

    
91

    
92
CONFIGURATION
93
-------------
94

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

    
99
- get all cluster tags starting with **htools:iextags:**
100
- use their suffix as the prefix for exclusion tags
101

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

    
107
OPTIONS
108
-------
109

    
110
The options that can be passed to the program are as follows:
111

    
112
EXIT STATUS
113
-----------
114

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

    
118
.. vim: set textwidth=72 :
119
.. Local Variables:
120
.. mode: rst
121
.. fill-column: 72
122
.. End: