Statistics
| Branch: | Tag: | Revision:

root / man / htools.rst @ 216d23c0

History | View | Annotate | Download (8.2 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
**hspace**
16
  cluster capacity computation
17

    
18
**hail**
19
  IAllocator plugin
20

    
21
**hscan**
22
  saves cluster state for later reuse
23

    
24

    
25
DESCRIPTION
26
-----------
27

    
28

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

    
35
Installed as ``hbal``, it computes and optionally executes a suite of
36
instance moves in order to balance the cluster.
37

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

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

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

    
48
COMMON OPTIONS
49
--------------
50

    
51
Options behave the same in all program modes, but not all program modes
52
support all options. Some common options are:
53

    
54
-p, \--print-nodes
55
  Prints the node status, in a format designed to allow the user to
56
  understand the node's most important parameters. If the command in
57
  question makes a cluster transition (e.g. balancing or allocation),
58
  then usually both the initial and final node status is printed.
59

    
60
  It is possible to customise the listed information by passing a
61
  comma-separated list of field names to this option (the field list
62
  is currently undocumented), or to extend the default field list by
63
  prefixing the additional field list with a plus sign. By default,
64
  the node list will contain the following information:
65

    
66
  F
67
    a character denoting the status of the node, with '-' meaning an
68
    offline node, '*' meaning N+1 failure and blank meaning a good
69
    node
70

    
71
  Name
72
    the node name
73

    
74
  t_mem
75
    the total node memory
76

    
77
  n_mem
78
    the memory used by the node itself
79

    
80
  i_mem
81
    the memory used by instances
82

    
83
  x_mem
84
    amount memory which seems to be in use but cannot be determined
85
    why or by which instance; usually this means that the hypervisor
86
    has some overhead or that there are other reporting errors
87

    
88
  f_mem
89
    the free node memory
90

    
91
  r_mem
92
    the reserved node memory, which is the amount of free memory
93
    needed for N+1 compliance
94

    
95
  t_dsk
96
    total disk
97

    
98
  f_dsk
99
    free disk
100

    
101
  pcpu
102
    the number of physical cpus on the node
103

    
104
  vcpu
105
    the number of virtual cpus allocated to primary instances
106

    
107
  pcnt
108
    number of primary instances
109

    
110
  scnt
111
    number of secondary instances
112

    
113
  p_fmem
114
    percent of free memory
115

    
116
  p_fdsk
117
    percent of free disk
118

    
119
  r_cpu
120
    ratio of virtual to physical cpus
121

    
122
  lCpu
123
    the dynamic CPU load (if the information is available)
124

    
125
  lMem
126
    the dynamic memory load (if the information is available)
127

    
128
  lDsk
129
    the dynamic disk load (if the information is available)
130

    
131
  lNet
132
    the dynamic net load (if the information is available)
133

    
134
-t *datafile*, \--text-data=*datafile*
135
  Backend specification: the name of the file holding node and instance
136
  information (if not collecting via RAPI or LUXI). This or one of the
137
  other backends must be selected. The option is described in the man
138
  page **htools**(1).
139

    
140
  The file should contain text data, line-based, with two empty lines
141
  separating sections. The lines themselves are column-based, with the
142
  pipe symbol (``|``) acting as separator.
143

    
144
  The first section contains group data, with two columns:
145

    
146
  - group name
147
  - group uuid
148

    
149
  The second sections contains node data, with the following columns:
150

    
151
  - node name
152
  - node total memory
153
  - node free memory
154
  - node total disk
155
  - node free disk
156
  - node physical cores
157
  - offline field (as ``Y`` or ``N``)
158
  - group UUID
159
  - node spindle count
160

    
161
  The third section contains instance data, with the fields:
162

    
163
  - instance name
164
  - instance memory
165
  - instance disk size
166
  - instance vcpus
167
  - instance status (in Ganeti's format, e.g. ``running`` or ``ERROR_down``)
168
  - instance ``auto_balance`` flag (see man page **gnt-instance** (7))
169
  - instance primary node
170
  - instance secondary node(s), if any
171
  - instance disk type (e.g. ``plain`` or ``drbd``)
172
  - instance tags
173

    
174
  The fourth section contains the cluster tags, with one tag per line
175
  (no columns/no column processing).
176

    
177
  The fifth section contains the ipolicies of the cluster and the node
178
  groups, in the following format (separated by ``|``):
179

    
180
  - owner (empty if cluster, group name otherwise)
181
  - standard, min, max instance specs, containing the following values
182
    separated by commas:
183
    - memory size
184
    - cpu count
185
    - disk size
186
    - disk count
187
    - nic count
188
  - disk templates
189
  - vcpu ratio
190
  - spindle ratio
191

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

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

    
206
-I|\--ialloc-src *path*
207
  Backend specification: load data directly from an iallocator request
208
  (as produced by Ganeti when doing an iallocator call).  The iallocator
209
  request is read from specified path.
210

    
211
\--simulate *description*
212
  Backend specification: instead of using actual data, build an empty
213
  cluster given a node description. The *description* parameter must be
214
  a comma-separated list of five elements, describing in order:
215

    
216
  - the allocation policy for this node group (*preferred*, *allocable*
217
    or *unallocable*, or alternatively the short forms *p*, *a* or *u*)
218
  - the number of nodes in the cluster
219
  - the disk size of the nodes (default in mebibytes, units can be used)
220
  - the memory size of the nodes (default in mebibytes, units can be used)
221
  - the cpu core count for the nodes
222
  - the spindle count for the nodes
223

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

    
229
  This option can be given multiple times, and each new use defines a
230
  new node group. Hence different node groups can have different
231
  allocation policies and node count/specifications.
232

    
233
-v, \--verbose
234
  Increase the output verbosity. Each usage of this option will
235
  increase the verbosity (currently more than 2 doesn't make sense)
236
  from the default of one.
237

    
238
-q, \--quiet
239
  Decrease the output verbosity. Each usage of this option will
240
  decrease the verbosity (less than zero doesn't make sense) from the
241
  default of one.
242

    
243
-V, \--version
244
  Just show the program version and exit.
245

    
246
UNITS
247
~~~~~
248

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

    
258
More details about the difference between the SI and binary systems can
259
be read in the *units(7)* man page.
260

    
261
ENVIRONMENT
262
-----------
263

    
264
The environment variable ``HTOOLS`` can be used instead of
265
renaming/symlinking the programs; simply set it to the desired role and
266
then the name of the program is no longer used.
267

    
268
.. vim: set textwidth=72 :
269
.. Local Variables:
270
.. mode: rst
271
.. fill-column: 72
272
.. End: