Statistics
| Branch: | Tag: | Revision:

root / man / hail.rst @ 88df1fa9

History | View | Annotate | Download (3.9 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
72
  data in the JSON request itself. This is mostly used for debugging.
73

    
74
--simulate *description*
75
  Similar to the **-t** option, this allows overriding the cluster
76
  data with a simulated cluster. For details about the description,
77
  see the man page **hspace**(1).
78

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

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

    
90

    
91
CONFIGURATION
92
-------------
93

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

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

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

    
106
OPTIONS
107
-------
108

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

    
111
EXIT STATUS
112
-----------
113

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

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