root / README @ 00b15752
History | View | Annotate | Download (2 kB)
1 |
Ganeti Cluster tools (htools) |
---|---|
2 |
============================= |
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. |
7 |
|
8 |
|
9 |
Cluster N+1 solver |
10 |
------------------ |
11 |
|
12 |
This program runs a very simple brute force algorithm over the instance |
13 |
placement space in order to determine the shortest number of replace-disks |
14 |
needed to fix the cluster. Note this means we won't get a balanced cluster, |
15 |
just one that passes N+1 checks. |
16 |
|
17 |
For algorithm details and usage, see the man page hn1(1). |
18 |
|
19 |
Cluster rebalancer |
20 |
------------------ |
21 |
|
22 |
Compared to the N+1 solver, the rebalancer uses a very simple algorithm: |
23 |
repeatedly try to move each instance one step, so that the cluster score |
24 |
becomes better. We stop when no further move can improve the score. |
25 |
|
26 |
For algorithm details and usage, see the man page hbal(1). |
27 |
|
28 |
Integration with Ganeti |
29 |
----------------------- |
30 |
|
31 |
The programs can either get their input from text files, or online |
32 |
from a cluster via RAPI. For online collection via RAPI, the "-m" |
33 |
argument to both hn1 and hbal should specify the cluster or master |
34 |
node name. |
35 |
|
36 |
For text files, a separate tool (hscan) is provided to automate their |
37 |
gathering if RAPI is available, which is better since it can extract |
38 |
more precise information. In case RAPI is not usable for whatever |
39 |
reason, the following two commands should be run:: |
40 |
|
41 |
gnt-node list -oname,mtotal,mnode,mfree,dtotal,dfree,offline \ |
42 |
--separator '|' --no-headers > nodes |
43 |
gnt-instance list -oname,admin_ram,sda_size,status,pnode,snodes \ |
44 |
--separator '|' --no-head > instances |
45 |
|
46 |
These two files should be saved under the names of *nodes* and *instances*. |
47 |
|
48 |
Installation |
49 |
------------ |
50 |
|
51 |
If installing from source, you need a working ghc compiler (6.8 at |
52 |
least) and some extra Haskell libraries which usually need to be |
53 |
installed manually: |
54 |
|
55 |
- json |
56 |
- curl |
57 |
|
58 |
One these are available, just typing *make* in the top-level directory |
59 |
should be enough. |
60 |
|
61 |
Internal (implementation) documentation is available in the ``apidoc`` |
62 |
directory. |