Statistics
| Branch: | Tag: | Revision:

root / README @ 6ef35e3c

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.
6

    
7

    
8
Cluster N+1 solver
9
------------------
10

    
11
This program runs a very simple brute force algorithm over the instance
12
placement space in order to determine the shortest number of replace-disks
13
needed to fix the cluster. Note this means we won't get a balanced cluster,
14
just one that passes N+1 checks.
15

    
16
For algorithm details and usage, see the man page hn1(1).
17

    
18
Cluster rebalancer
19
------------------
20

    
21
Compared to the N+1 solver, the rebalancer uses a very simple algorithm:
22
repeatedly try to move each instance one step, so that the cluster score
23
becomes better. We stop when no further move can improve the score.
24

    
25
For algorithm details and usage, see the man page hbal(1).
26

    
27
Integration with Ganeti
28
-----------------------
29

    
30
The programs can either get their input from text files, or online
31
from a cluster via RAPI. For online collection via RAPI, the "-m"
32
argument to both hn1 and hbal should specify the cluster or master
33
node name.
34

    
35
For text files, a separate tool (hscan) is provided to automate their
36
gathering if RAPI is available, which is better since it can extract
37
more precise information. In case RAPI is not usable for whatever
38
reason, the following two commands should be run::
39

    
40
    gnt-node list -oname,mtotal,mnode,mfree,dtotal,dfree \
41
      --separator '|' --no-headers > nodes
42
    gnt-instance list -oname,admin_ram,sda_size,status,pnode,snodes \
43
      --separator '|' --no-head > instances
44

    
45
These two files should be saved under the names of *nodes* and *instances*.
46

    
47
Installation
48
------------
49

    
50
If installing from source, you need a working ghc compiler (6.8 at
51
least) and some extra Haskell libraries which usually need to be
52
installed manually:
53

    
54
- json
55
- curl
56

    
57
One these are available, just typing *make* in the top-level directory
58
should be enough.
59

    
60
Internal (implementation) documentation is available in the ``apidoc``
61
directory.