Statistics
| Branch: | Tag: | Revision:

root / man / hail.rst @ 896a03f6

History | View | Annotate | Download (3.7 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 node changes (*change-node* mode), we currently support DRBD
41
instances only, and all three modes (primary changes, secondary changes
42
and all node changes).
43

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

    
51
The deprecated *relocate* and *multi-evacuate* modes are no longer
52
supported.
53

    
54
In all cases, the cluster (or group) scoring is identical to the hbal
55
algorithm.
56

    
57
OPTIONS
58
-------
59

    
60
The options that can be passed to the program are as follows:
61

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

    
67
-t *datafile*, --text-data=*datafile*
68
  The name of the file holding cluster information, to override the
69
  data in the JSON request itself. This is mostly used for debugging.
70

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

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

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

    
87

    
88
CONFIGURATION
89
-------------
90

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

    
95
- get all cluster tags starting with **htools:iextags:**
96
- use their suffix as the prefix for exclusion tags
97

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

    
103
OPTIONS
104
-------
105

    
106
The options that can be passed to the program are as follows:
107

    
108
EXIT STATUS
109
-----------
110

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

    
114
.. vim: set textwidth=72 :
115
.. Local Variables:
116
.. mode: rst
117
.. fill-column: 72
118
.. End: