Revision 9256e36a
b/README | ||
---|---|---|
1 |
Ganeti Cluster tools (htools) |
|
2 |
============================= |
|
1 |
Ganeti Cluster tools (ganeti-htools)
|
|
2 |
====================================
|
|
3 | 3 |
|
4 |
These are some simple cluster tools for fixing common problems. Right |
|
5 |
now N+1 and rebalancing are included. Starting with version 0.1.0, |
|
6 |
only Ganeti 2.0 is supported. |
|
4 |
These are some simple cluster tools for fixing common allocation |
|
5 |
problems on Ganeti 2.0 clusters. |
|
7 | 6 |
|
7 |
Note that these tools are most useful for bigger cluster sizes |
|
8 |
(e.g. more than five or ten machines); at lower sizes, the |
|
9 |
computations they do can also be done manually. |
|
10 |
|
|
11 |
Available tools |
|
12 |
--------------- |
|
8 | 13 |
|
9 | 14 |
Cluster rebalancer |
10 |
------------------
|
|
15 |
~~~~~~~~~~~~~~~~~~
|
|
11 | 16 |
|
12 |
Compared to the N+1 solver, the rebalancer uses a very simple algorithm: |
|
13 |
repeatedly try to move each instance one step, so that the cluster score |
|
17 |
The rebalancer uses a simple algorithm to try to get the nodes of the |
|
18 |
cluster as equal as possible in their resource usage. It tries to |
|
19 |
repeatedly move each instance one step, so that the cluster score |
|
14 | 20 |
becomes better. We stop when no further move can improve the score. |
15 | 21 |
|
16 | 22 |
For algorithm details and usage, see the man page hbal(1). |
17 | 23 |
|
18 | 24 |
Cluster N+1 solver |
19 |
------------------
|
|
25 |
~~~~~~~~~~~~~~~~~~
|
|
20 | 26 |
|
21 | 27 |
This program runs a very simple brute force algorithm over the instance |
22 | 28 |
placement space in order to determine the shortest number of replace-disks |
23 | 29 |
needed to fix the cluster. Note this means we won't get a balanced cluster, |
24 | 30 |
just one that passes N+1 checks. |
25 | 31 |
|
26 |
For algorithm details and usage, see the man page hn1(1). **Note**: |
|
27 |
this program is deprecated, hbal should be used instead. |
|
32 |
For algorithm details and usage, see the man page hn1(1). |
|
33 |
|
|
34 |
.. note:: This program is deprecated, hbal should be used instead. |
|
28 | 35 |
|
29 | 36 |
IAllocator plugin |
30 |
-----------------
|
|
37 |
~~~~~~~~~~~~~~~~~
|
|
31 | 38 |
|
32 | 39 |
The ``hail`` iallocator plugin can be used for allocations of mirrored |
33 | 40 |
and non-mirrored instances and for relocations of mirrored |
34 | 41 |
instances. It needs to be installed in Ganeti's iallocator search |
35 | 42 |
path—usually ``/usr/lib/ganeti/iallocators`` or |
36 |
``/usr/local/lib/ganeti/iallocators``. |
|
43 |
``/usr/local/lib/ganeti/iallocators``. See the man page hail(1).
|
|
37 | 44 |
|
38 | 45 |
Integration with Ganeti |
39 | 46 |
----------------------- |
... | ... | |
45 | 52 |
and thus doesn't need any special setup (just needs to be installed in |
46 | 53 |
the right directory). |
47 | 54 |
|
48 |
For text files, a separate tool (hscan) is provided to automate their
|
|
49 |
gathering if RAPI is available, which is better since it can extract
|
|
50 |
more precise information. In case RAPI is not usable for whatever
|
|
51 |
reason, the following two commands should be run:: |
|
55 |
For generating the text files, a separate tool (hscan) is provided to
|
|
56 |
automate their gathering if RAPI is available, which is better since
|
|
57 |
it can extract more precise information. In case RAPI is not usable
|
|
58 |
for whatever reason, the following two commands should be run::
|
|
52 | 59 |
|
53 | 60 |
gnt-node list -oname,mtotal,mnode,mfree,dtotal,dfree,offline \ |
54 | 61 |
--separator '|' --no-headers > nodes |
55 |
gnt-instance list -oname,admin_ram,sda_size,status,pnode,snodes \
|
|
62 |
gnt-instance list -oname,be/memory,sda_size,status,pnode,snodes \
|
|
56 | 63 |
--separator '|' --no-head > instances |
57 | 64 |
|
58 | 65 |
These two files should be saved under the names of *nodes* and |
... | ... | |
73 | 80 |
|
74 | 81 |
Internal (implementation) documentation is available in the ``apidoc`` |
75 | 82 |
directory. |
83 |
|
|
84 |
.. Local Variables: |
|
85 |
.. mode: rst |
|
86 |
.. End: |
Also available in: Unified diff