Statistics
| Branch: | Tag: | Revision:

root / man / htools.rst @ 2ab65a5d

History | View | Annotate | Download (8.6 kB)

1 d26d808a Iustin Pop
HTOOLS(1) Ganeti | Version @GANETI_VERSION@
2 d26d808a Iustin Pop
===========================================
3 d26d808a Iustin Pop
4 d26d808a Iustin Pop
NAME
5 d26d808a Iustin Pop
----
6 d26d808a Iustin Pop
7 d26d808a Iustin Pop
htools - Cluster allocation and placement tools for Ganeti
8 d26d808a Iustin Pop
9 d26d808a Iustin Pop
SYNOPSIS
10 d26d808a Iustin Pop
--------
11 d26d808a Iustin Pop
12 d26d808a Iustin Pop
**hbal**
13 d26d808a Iustin Pop
  cluster balancer
14 d26d808a Iustin Pop
15 22e513e7 Agata Murawska
**hcheck**
16 22e513e7 Agata Murawska
  cluster checker
17 22e513e7 Agata Murawska
18 d26d808a Iustin Pop
**hspace**
19 d26d808a Iustin Pop
  cluster capacity computation
20 d26d808a Iustin Pop
21 d26d808a Iustin Pop
**hail**
22 d26d808a Iustin Pop
  IAllocator plugin
23 d26d808a Iustin Pop
24 d26d808a Iustin Pop
**hscan**
25 d26d808a Iustin Pop
  saves cluster state for later reuse
26 d26d808a Iustin Pop
27 80143203 Agata Murawska
**hinfo**
28 80143203 Agata Murawska
  cluster information printer
29 80143203 Agata Murawska
30 3504d6c8 Guido Trotter
**hroller**
31 3504d6c8 Guido Trotter
  cluster rolling maintenance scheduler
32 d26d808a Iustin Pop
33 d26d808a Iustin Pop
DESCRIPTION
34 d26d808a Iustin Pop
-----------
35 d26d808a Iustin Pop
36 d26d808a Iustin Pop
``htools`` is a suite of tools designed to help with allocation/movement
37 d26d808a Iustin Pop
of instances and balancing of Ganeti clusters. ``htools`` is also the
38 d26d808a Iustin Pop
generic binary that must be symlinked or hardlinked under each tool's
39 d26d808a Iustin Pop
name in order to perform the different functions. Alternatively, the
40 d26d808a Iustin Pop
environment variable HTOOLS can be used to set the desired role.
41 d26d808a Iustin Pop
42 d26d808a Iustin Pop
Installed as ``hbal``, it computes and optionally executes a suite of
43 d26d808a Iustin Pop
instance moves in order to balance the cluster.
44 d26d808a Iustin Pop
45 22e513e7 Agata Murawska
Installed as ``hcheck``, it preforms cluster checks and optionally
46 22e513e7 Agata Murawska
simulates rebalancing with all the ``hbal`` options available.
47 22e513e7 Agata Murawska
48 d26d808a Iustin Pop
Installed as ``hspace``, it computes how many additional instances can
49 d26d808a Iustin Pop
be fit on a cluster, while maintaining N+1 status. It can run on models
50 d26d808a Iustin Pop
of existing clusters or of simulated clusters.
51 d26d808a Iustin Pop
52 d26d808a Iustin Pop
Installed as ``hail``, it acts as an IAllocator plugin, i.e. it is used
53 d26d808a Iustin Pop
by Ganeti to compute new instance allocations and instance moves.
54 d26d808a Iustin Pop
55 d26d808a Iustin Pop
Installed as ``hscan``, it scans the local or remote cluster state and
56 d26d808a Iustin Pop
saves it to files which can later be reused by the other roles.
57 d26d808a Iustin Pop
58 80143203 Agata Murawska
Installed as ``hinfo``, it prints information about the current cluster
59 80143203 Agata Murawska
state.
60 80143203 Agata Murawska
61 3504d6c8 Guido Trotter
Installed as ``hroller``, it helps scheduling maintenances that require
62 3504d6c8 Guido Trotter
node reboots on a cluster.
63 3504d6c8 Guido Trotter
64 d26d808a Iustin Pop
COMMON OPTIONS
65 d26d808a Iustin Pop
--------------
66 d26d808a Iustin Pop
67 d26d808a Iustin Pop
Options behave the same in all program modes, but not all program modes
68 d26d808a Iustin Pop
support all options. Some common options are:
69 d26d808a Iustin Pop
70 f624fa95 Iustin Pop
-p, \--print-nodes
71 d7731f51 Iustin Pop
  Prints the node status, in a format designed to allow the user to
72 d7731f51 Iustin Pop
  understand the node's most important parameters. If the command in
73 d7731f51 Iustin Pop
  question makes a cluster transition (e.g. balancing or allocation),
74 d7731f51 Iustin Pop
  then usually both the initial and final node status is printed.
75 d7731f51 Iustin Pop
76 d7731f51 Iustin Pop
  It is possible to customise the listed information by passing a
77 d7731f51 Iustin Pop
  comma-separated list of field names to this option (the field list
78 d7731f51 Iustin Pop
  is currently undocumented), or to extend the default field list by
79 d7731f51 Iustin Pop
  prefixing the additional field list with a plus sign. By default,
80 d7731f51 Iustin Pop
  the node list will contain the following information:
81 d7731f51 Iustin Pop
82 d7731f51 Iustin Pop
  F
83 d7731f51 Iustin Pop
    a character denoting the status of the node, with '-' meaning an
84 d7731f51 Iustin Pop
    offline node, '*' meaning N+1 failure and blank meaning a good
85 d7731f51 Iustin Pop
    node
86 d7731f51 Iustin Pop
87 d7731f51 Iustin Pop
  Name
88 d7731f51 Iustin Pop
    the node name
89 d7731f51 Iustin Pop
90 d7731f51 Iustin Pop
  t_mem
91 d7731f51 Iustin Pop
    the total node memory
92 d7731f51 Iustin Pop
93 d7731f51 Iustin Pop
  n_mem
94 d7731f51 Iustin Pop
    the memory used by the node itself
95 d7731f51 Iustin Pop
96 d7731f51 Iustin Pop
  i_mem
97 d7731f51 Iustin Pop
    the memory used by instances
98 d7731f51 Iustin Pop
99 d7731f51 Iustin Pop
  x_mem
100 d7731f51 Iustin Pop
    amount memory which seems to be in use but cannot be determined
101 d7731f51 Iustin Pop
    why or by which instance; usually this means that the hypervisor
102 d7731f51 Iustin Pop
    has some overhead or that there are other reporting errors
103 d7731f51 Iustin Pop
104 d7731f51 Iustin Pop
  f_mem
105 d7731f51 Iustin Pop
    the free node memory
106 d7731f51 Iustin Pop
107 d7731f51 Iustin Pop
  r_mem
108 d7731f51 Iustin Pop
    the reserved node memory, which is the amount of free memory
109 d7731f51 Iustin Pop
    needed for N+1 compliance
110 d7731f51 Iustin Pop
111 d7731f51 Iustin Pop
  t_dsk
112 d7731f51 Iustin Pop
    total disk
113 d7731f51 Iustin Pop
114 d7731f51 Iustin Pop
  f_dsk
115 d7731f51 Iustin Pop
    free disk
116 d7731f51 Iustin Pop
117 d7731f51 Iustin Pop
  pcpu
118 d7731f51 Iustin Pop
    the number of physical cpus on the node
119 d7731f51 Iustin Pop
120 d7731f51 Iustin Pop
  vcpu
121 d7731f51 Iustin Pop
    the number of virtual cpus allocated to primary instances
122 d7731f51 Iustin Pop
123 d7731f51 Iustin Pop
  pcnt
124 d7731f51 Iustin Pop
    number of primary instances
125 d7731f51 Iustin Pop
126 d7731f51 Iustin Pop
  scnt
127 d7731f51 Iustin Pop
    number of secondary instances
128 d7731f51 Iustin Pop
129 d7731f51 Iustin Pop
  p_fmem
130 d7731f51 Iustin Pop
    percent of free memory
131 d7731f51 Iustin Pop
132 d7731f51 Iustin Pop
  p_fdsk
133 d7731f51 Iustin Pop
    percent of free disk
134 d7731f51 Iustin Pop
135 d7731f51 Iustin Pop
  r_cpu
136 d7731f51 Iustin Pop
    ratio of virtual to physical cpus
137 d7731f51 Iustin Pop
138 d7731f51 Iustin Pop
  lCpu
139 d7731f51 Iustin Pop
    the dynamic CPU load (if the information is available)
140 d7731f51 Iustin Pop
141 d7731f51 Iustin Pop
  lMem
142 d7731f51 Iustin Pop
    the dynamic memory load (if the information is available)
143 d7731f51 Iustin Pop
144 d7731f51 Iustin Pop
  lDsk
145 d7731f51 Iustin Pop
    the dynamic disk load (if the information is available)
146 d7731f51 Iustin Pop
147 d7731f51 Iustin Pop
  lNet
148 d7731f51 Iustin Pop
    the dynamic net load (if the information is available)
149 d7731f51 Iustin Pop
150 f624fa95 Iustin Pop
-t *datafile*, \--text-data=*datafile*
151 acd9fa11 Iustin Pop
  Backend specification: the name of the file holding node and instance
152 acd9fa11 Iustin Pop
  information (if not collecting via RAPI or LUXI). This or one of the
153 acd9fa11 Iustin Pop
  other backends must be selected. The option is described in the man
154 354c4f62 Michael Hanselmann
  page **htools**\(1).
155 acd9fa11 Iustin Pop
156 acd9fa11 Iustin Pop
  The file should contain text data, line-based, with two empty lines
157 acd9fa11 Iustin Pop
  separating sections. The lines themselves are column-based, with the
158 acd9fa11 Iustin Pop
  pipe symbol (``|``) acting as separator.
159 acd9fa11 Iustin Pop
160 acd9fa11 Iustin Pop
  The first section contains group data, with two columns:
161 acd9fa11 Iustin Pop
162 acd9fa11 Iustin Pop
  - group name
163 acd9fa11 Iustin Pop
  - group uuid
164 acd9fa11 Iustin Pop
165 acd9fa11 Iustin Pop
  The second sections contains node data, with the following columns:
166 acd9fa11 Iustin Pop
167 acd9fa11 Iustin Pop
  - node name
168 acd9fa11 Iustin Pop
  - node total memory
169 acd9fa11 Iustin Pop
  - node free memory
170 acd9fa11 Iustin Pop
  - node total disk
171 acd9fa11 Iustin Pop
  - node free disk
172 acd9fa11 Iustin Pop
  - node physical cores
173 acd9fa11 Iustin Pop
  - offline field (as ``Y`` or ``N``)
174 acd9fa11 Iustin Pop
  - group UUID
175 f951bd09 Iustin Pop
  - node spindle count
176 acd9fa11 Iustin Pop
177 acd9fa11 Iustin Pop
  The third section contains instance data, with the fields:
178 acd9fa11 Iustin Pop
179 acd9fa11 Iustin Pop
  - instance name
180 acd9fa11 Iustin Pop
  - instance memory
181 acd9fa11 Iustin Pop
  - instance disk size
182 acd9fa11 Iustin Pop
  - instance vcpus
183 acd9fa11 Iustin Pop
  - instance status (in Ganeti's format, e.g. ``running`` or ``ERROR_down``)
184 8d090b90 Guido Trotter
  - instance ``auto_balance`` flag (see man page **gnt-instance**\(8))
185 acd9fa11 Iustin Pop
  - instance primary node
186 acd9fa11 Iustin Pop
  - instance secondary node(s), if any
187 acd9fa11 Iustin Pop
  - instance disk type (e.g. ``plain`` or ``drbd``)
188 acd9fa11 Iustin Pop
  - instance tags
189 acd9fa11 Iustin Pop
190 f951bd09 Iustin Pop
  The fourth section contains the cluster tags, with one tag per line
191 f951bd09 Iustin Pop
  (no columns/no column processing).
192 f951bd09 Iustin Pop
193 f951bd09 Iustin Pop
  The fifth section contains the ipolicies of the cluster and the node
194 f951bd09 Iustin Pop
  groups, in the following format (separated by ``|``):
195 f951bd09 Iustin Pop
196 f951bd09 Iustin Pop
  - owner (empty if cluster, group name otherwise)
197 f951bd09 Iustin Pop
  - standard, min, max instance specs, containing the following values
198 f951bd09 Iustin Pop
    separated by commas:
199 f951bd09 Iustin Pop
    - memory size
200 f951bd09 Iustin Pop
    - cpu count
201 f951bd09 Iustin Pop
    - disk size
202 f951bd09 Iustin Pop
    - disk count
203 c8b96be4 Guido Trotter
    - NIC count
204 f951bd09 Iustin Pop
  - disk templates
205 f951bd09 Iustin Pop
  - vcpu ratio
206 f951bd09 Iustin Pop
  - spindle ratio
207 acd9fa11 Iustin Pop
208 acd9fa11 Iustin Pop
-m *cluster*
209 acd9fa11 Iustin Pop
  Backend specification: collect data directly from the *cluster* given
210 acd9fa11 Iustin Pop
  as an argument via RAPI. If the argument doesn't contain a colon (:),
211 acd9fa11 Iustin Pop
  then it is converted into a fully-built URL via prepending
212 acd9fa11 Iustin Pop
  ``https://`` and appending the default RAPI port, otherwise it is
213 acd9fa11 Iustin Pop
  considered a fully-specified URL and used as-is.
214 acd9fa11 Iustin Pop
215 acd9fa11 Iustin Pop
-L [*path*]
216 acd9fa11 Iustin Pop
  Backend specification: collect data directly from the master daemon,
217 acd9fa11 Iustin Pop
  which is to be contacted via LUXI (an internal Ganeti protocol). An
218 acd9fa11 Iustin Pop
  optional *path* argument is interpreted as the path to the unix socket
219 acd9fa11 Iustin Pop
  on which the master daemon listens; otherwise, the default path used
220 acd9fa11 Iustin Pop
  by Ganeti (configured at build time) is used.
221 acd9fa11 Iustin Pop
222 0547d608 René Nussbaumer
-I|\--ialloc-src *path*
223 0547d608 René Nussbaumer
  Backend specification: load data directly from an iallocator request
224 0547d608 René Nussbaumer
  (as produced by Ganeti when doing an iallocator call).  The iallocator
225 0547d608 René Nussbaumer
  request is read from specified path.
226 0547d608 René Nussbaumer
227 f624fa95 Iustin Pop
\--simulate *description*
228 acd9fa11 Iustin Pop
  Backend specification: instead of using actual data, build an empty
229 acd9fa11 Iustin Pop
  cluster given a node description. The *description* parameter must be
230 acd9fa11 Iustin Pop
  a comma-separated list of five elements, describing in order:
231 acd9fa11 Iustin Pop
232 acd9fa11 Iustin Pop
  - the allocation policy for this node group (*preferred*, *allocable*
233 acd9fa11 Iustin Pop
    or *unallocable*, or alternatively the short forms *p*, *a* or *u*)
234 acd9fa11 Iustin Pop
  - the number of nodes in the cluster
235 acd9fa11 Iustin Pop
  - the disk size of the nodes (default in mebibytes, units can be used)
236 acd9fa11 Iustin Pop
  - the memory size of the nodes (default in mebibytes, units can be used)
237 acd9fa11 Iustin Pop
  - the cpu core count for the nodes
238 0c7d4422 Iustin Pop
  - the spindle count for the nodes
239 acd9fa11 Iustin Pop
240 1279c691 Iustin Pop
  An example description would be **preferred,20,100G,16g,4,2**
241 0c7d4422 Iustin Pop
  describing a 20-node cluster where each node has 100GB of disk space,
242 0c7d4422 Iustin Pop
  16GiB of memory, 4 CPU cores and 2 disk spindles. Note that all nodes
243 0c7d4422 Iustin Pop
  must have the same specs currently.
244 acd9fa11 Iustin Pop
245 acd9fa11 Iustin Pop
  This option can be given multiple times, and each new use defines a
246 acd9fa11 Iustin Pop
  new node group. Hence different node groups can have different
247 acd9fa11 Iustin Pop
  allocation policies and node count/specifications.
248 acd9fa11 Iustin Pop
249 f624fa95 Iustin Pop
-v, \--verbose
250 d26d808a Iustin Pop
  Increase the output verbosity. Each usage of this option will
251 d26d808a Iustin Pop
  increase the verbosity (currently more than 2 doesn't make sense)
252 d26d808a Iustin Pop
  from the default of one.
253 d26d808a Iustin Pop
254 f624fa95 Iustin Pop
-q, \--quiet
255 d26d808a Iustin Pop
  Decrease the output verbosity. Each usage of this option will
256 d26d808a Iustin Pop
  decrease the verbosity (less than zero doesn't make sense) from the
257 d26d808a Iustin Pop
  default of one.
258 d26d808a Iustin Pop
259 f624fa95 Iustin Pop
-V, \--version
260 d26d808a Iustin Pop
  Just show the program version and exit.
261 d26d808a Iustin Pop
262 d26d808a Iustin Pop
UNITS
263 d26d808a Iustin Pop
~~~~~
264 d26d808a Iustin Pop
265 d26d808a Iustin Pop
Some options accept not simply numerical values, but numerical values
266 d26d808a Iustin Pop
together with a unit. By default, such unit-accepting options use
267 d26d808a Iustin Pop
mebibytes. Using the lower-case letters of *m*, *g* and *t* (or their
268 d26d808a Iustin Pop
longer equivalents of *mib*, *gib*, *tib*, for which case doesn't
269 d26d808a Iustin Pop
matter) explicit binary units can be selected. Units in the SI system
270 d26d808a Iustin Pop
can be selected using the upper-case letters of *M*, *G* and *T* (or
271 d26d808a Iustin Pop
their longer equivalents of *MB*, *GB*, *TB*, for which case doesn't
272 d26d808a Iustin Pop
matter).
273 d26d808a Iustin Pop
274 d26d808a Iustin Pop
More details about the difference between the SI and binary systems can
275 354c4f62 Michael Hanselmann
be read in the **units**\(7) man page.
276 d26d808a Iustin Pop
277 d26d808a Iustin Pop
ENVIRONMENT
278 d26d808a Iustin Pop
-----------
279 d26d808a Iustin Pop
280 d26d808a Iustin Pop
The environment variable ``HTOOLS`` can be used instead of
281 d26d808a Iustin Pop
renaming/symlinking the programs; simply set it to the desired role and
282 d26d808a Iustin Pop
then the name of the program is no longer used.
283 d26d808a Iustin Pop
284 d26d808a Iustin Pop
.. vim: set textwidth=72 :
285 d26d808a Iustin Pop
.. Local Variables:
286 d26d808a Iustin Pop
.. mode: rst
287 d26d808a Iustin Pop
.. fill-column: 72
288 d26d808a Iustin Pop
.. End: