Statistics
| Branch: | Tag: | Revision:

root / man / htools.rst @ 22e513e7

History | View | Annotate | Download (8.3 kB)

1
HTOOLS(1) Ganeti | Version @GANETI_VERSION@
2
===========================================
3

    
4
NAME
5
----
6

    
7
htools - Cluster allocation and placement tools for Ganeti
8

    
9
SYNOPSIS
10
--------
11

    
12
**hbal**
13
  cluster balancer
14

    
15
**hcheck**
16
  cluster checker
17

    
18
**hspace**
19
  cluster capacity computation
20

    
21
**hail**
22
  IAllocator plugin
23

    
24
**hscan**
25
  saves cluster state for later reuse
26

    
27

    
28
DESCRIPTION
29
-----------
30

    
31

    
32
``htools`` is a suite of tools designed to help with allocation/movement
33
of instances and balancing of Ganeti clusters. ``htools`` is also the
34
generic binary that must be symlinked or hardlinked under each tool's
35
name in order to perform the different functions. Alternatively, the
36
environment variable HTOOLS can be used to set the desired role.
37

    
38
Installed as ``hbal``, it computes and optionally executes a suite of
39
instance moves in order to balance the cluster.
40

    
41
Installed as ``hcheck``, it preforms cluster checks and optionally
42
simulates rebalancing with all the ``hbal`` options available.
43

    
44
Installed as ``hspace``, it computes how many additional instances can
45
be fit on a cluster, while maintaining N+1 status. It can run on models
46
of existing clusters or of simulated clusters.
47

    
48
Installed as ``hail``, it acts as an IAllocator plugin, i.e. it is used
49
by Ganeti to compute new instance allocations and instance moves.
50

    
51
Installed as ``hscan``, it scans the local or remote cluster state and
52
saves it to files which can later be reused by the other roles.
53

    
54
COMMON OPTIONS
55
--------------
56

    
57
Options behave the same in all program modes, but not all program modes
58
support all options. Some common options are:
59

    
60
-p, \--print-nodes
61
  Prints the node status, in a format designed to allow the user to
62
  understand the node's most important parameters. If the command in
63
  question makes a cluster transition (e.g. balancing or allocation),
64
  then usually both the initial and final node status is printed.
65

    
66
  It is possible to customise the listed information by passing a
67
  comma-separated list of field names to this option (the field list
68
  is currently undocumented), or to extend the default field list by
69
  prefixing the additional field list with a plus sign. By default,
70
  the node list will contain the following information:
71

    
72
  F
73
    a character denoting the status of the node, with '-' meaning an
74
    offline node, '*' meaning N+1 failure and blank meaning a good
75
    node
76

    
77
  Name
78
    the node name
79

    
80
  t_mem
81
    the total node memory
82

    
83
  n_mem
84
    the memory used by the node itself
85

    
86
  i_mem
87
    the memory used by instances
88

    
89
  x_mem
90
    amount memory which seems to be in use but cannot be determined
91
    why or by which instance; usually this means that the hypervisor
92
    has some overhead or that there are other reporting errors
93

    
94
  f_mem
95
    the free node memory
96

    
97
  r_mem
98
    the reserved node memory, which is the amount of free memory
99
    needed for N+1 compliance
100

    
101
  t_dsk
102
    total disk
103

    
104
  f_dsk
105
    free disk
106

    
107
  pcpu
108
    the number of physical cpus on the node
109

    
110
  vcpu
111
    the number of virtual cpus allocated to primary instances
112

    
113
  pcnt
114
    number of primary instances
115

    
116
  scnt
117
    number of secondary instances
118

    
119
  p_fmem
120
    percent of free memory
121

    
122
  p_fdsk
123
    percent of free disk
124

    
125
  r_cpu
126
    ratio of virtual to physical cpus
127

    
128
  lCpu
129
    the dynamic CPU load (if the information is available)
130

    
131
  lMem
132
    the dynamic memory load (if the information is available)
133

    
134
  lDsk
135
    the dynamic disk load (if the information is available)
136

    
137
  lNet
138
    the dynamic net load (if the information is available)
139

    
140
-t *datafile*, \--text-data=*datafile*
141
  Backend specification: the name of the file holding node and instance
142
  information (if not collecting via RAPI or LUXI). This or one of the
143
  other backends must be selected. The option is described in the man
144
  page **htools**(1).
145

    
146
  The file should contain text data, line-based, with two empty lines
147
  separating sections. The lines themselves are column-based, with the
148
  pipe symbol (``|``) acting as separator.
149

    
150
  The first section contains group data, with two columns:
151

    
152
  - group name
153
  - group uuid
154

    
155
  The second sections contains node data, with the following columns:
156

    
157
  - node name
158
  - node total memory
159
  - node free memory
160
  - node total disk
161
  - node free disk
162
  - node physical cores
163
  - offline field (as ``Y`` or ``N``)
164
  - group UUID
165
  - node spindle count
166

    
167
  The third section contains instance data, with the fields:
168

    
169
  - instance name
170
  - instance memory
171
  - instance disk size
172
  - instance vcpus
173
  - instance status (in Ganeti's format, e.g. ``running`` or ``ERROR_down``)
174
  - instance ``auto_balance`` flag (see man page **gnt-instance** (7))
175
  - instance primary node
176
  - instance secondary node(s), if any
177
  - instance disk type (e.g. ``plain`` or ``drbd``)
178
  - instance tags
179

    
180
  The fourth section contains the cluster tags, with one tag per line
181
  (no columns/no column processing).
182

    
183
  The fifth section contains the ipolicies of the cluster and the node
184
  groups, in the following format (separated by ``|``):
185

    
186
  - owner (empty if cluster, group name otherwise)
187
  - standard, min, max instance specs, containing the following values
188
    separated by commas:
189
    - memory size
190
    - cpu count
191
    - disk size
192
    - disk count
193
    - nic count
194
  - disk templates
195
  - vcpu ratio
196
  - spindle ratio
197

    
198
-m *cluster*
199
  Backend specification: collect data directly from the *cluster* given
200
  as an argument via RAPI. If the argument doesn't contain a colon (:),
201
  then it is converted into a fully-built URL via prepending
202
  ``https://`` and appending the default RAPI port, otherwise it is
203
  considered a fully-specified URL and used as-is.
204

    
205
-L [*path*]
206
  Backend specification: collect data directly from the master daemon,
207
  which is to be contacted via LUXI (an internal Ganeti protocol). An
208
  optional *path* argument is interpreted as the path to the unix socket
209
  on which the master daemon listens; otherwise, the default path used
210
  by Ganeti (configured at build time) is used.
211

    
212
-I|\--ialloc-src *path*
213
  Backend specification: load data directly from an iallocator request
214
  (as produced by Ganeti when doing an iallocator call).  The iallocator
215
  request is read from specified path.
216

    
217
\--simulate *description*
218
  Backend specification: instead of using actual data, build an empty
219
  cluster given a node description. The *description* parameter must be
220
  a comma-separated list of five elements, describing in order:
221

    
222
  - the allocation policy for this node group (*preferred*, *allocable*
223
    or *unallocable*, or alternatively the short forms *p*, *a* or *u*)
224
  - the number of nodes in the cluster
225
  - the disk size of the nodes (default in mebibytes, units can be used)
226
  - the memory size of the nodes (default in mebibytes, units can be used)
227
  - the cpu core count for the nodes
228
  - the spindle count for the nodes
229

    
230
  An example description would be **preferred,B20,100G,16g,4,2**
231
  describing a 20-node cluster where each node has 100GB of disk space,
232
  16GiB of memory, 4 CPU cores and 2 disk spindles. Note that all nodes
233
  must have the same specs currently.
234

    
235
  This option can be given multiple times, and each new use defines a
236
  new node group. Hence different node groups can have different
237
  allocation policies and node count/specifications.
238

    
239
-v, \--verbose
240
  Increase the output verbosity. Each usage of this option will
241
  increase the verbosity (currently more than 2 doesn't make sense)
242
  from the default of one.
243

    
244
-q, \--quiet
245
  Decrease the output verbosity. Each usage of this option will
246
  decrease the verbosity (less than zero doesn't make sense) from the
247
  default of one.
248

    
249
-V, \--version
250
  Just show the program version and exit.
251

    
252
UNITS
253
~~~~~
254

    
255
Some options accept not simply numerical values, but numerical values
256
together with a unit. By default, such unit-accepting options use
257
mebibytes. Using the lower-case letters of *m*, *g* and *t* (or their
258
longer equivalents of *mib*, *gib*, *tib*, for which case doesn't
259
matter) explicit binary units can be selected. Units in the SI system
260
can be selected using the upper-case letters of *M*, *G* and *T* (or
261
their longer equivalents of *MB*, *GB*, *TB*, for which case doesn't
262
matter).
263

    
264
More details about the difference between the SI and binary systems can
265
be read in the *units(7)* man page.
266

    
267
ENVIRONMENT
268
-----------
269

    
270
The environment variable ``HTOOLS`` can be used instead of
271
renaming/symlinking the programs; simply set it to the desired role and
272
then the name of the program is no longer used.
273

    
274
.. vim: set textwidth=72 :
275
.. Local Variables:
276
.. mode: rst
277
.. fill-column: 72
278
.. End: