Revision 3504d6c8
b/Makefile.am | ||
---|---|---|
407 | 407 |
doc/walkthrough.rst |
408 | 408 |
|
409 | 409 |
HS_PROGS = htools/htools htools/mon-collector |
410 |
HS_BIN_ROLES = hbal hscan hspace hinfo hcheck |
|
410 |
HS_BIN_ROLES = hbal hscan hspace hinfo hcheck hroller
|
|
411 | 411 |
HS_HTOOLS_PROGS = $(HS_BIN_ROLES) hail |
412 | 412 |
|
413 | 413 |
HS_ALL_PROGS = \ |
... | ... | |
481 | 481 |
htools/Ganeti/HTools/Program/Hinfo.hs \ |
482 | 482 |
htools/Ganeti/HTools/Program/Hscan.hs \ |
483 | 483 |
htools/Ganeti/HTools/Program/Hspace.hs \ |
484 |
htools/Ganeti/HTools/Program/Hroller.hs \ |
|
484 | 485 |
htools/Ganeti/HTools/Types.hs \ |
485 | 486 |
htools/Ganeti/Hash.hs \ |
486 | 487 |
htools/Ganeti/JQueue.hs \ |
... | ... | |
851 | 852 |
man/hinfo.1 \ |
852 | 853 |
man/hscan.1 \ |
853 | 854 |
man/hspace.1 \ |
855 |
man/hroller.1 \ |
|
854 | 856 |
man/htools.1 \ |
855 | 857 |
man/mon-collector.7 |
856 | 858 |
|
b/autotools/run-in-tempdir | ||
---|---|---|
24 | 24 |
done |
25 | 25 |
|
26 | 26 |
for hfile in hpc-htools test offline-test.sh cli-tests-defs.sh \ |
27 |
hbal hscan hspace hinfo hcheck hail hpc-mon-collector; do |
|
27 |
hbal hscan hspace hinfo hcheck hail hroller hpc-mon-collector; do
|
|
28 | 28 |
if [ -e htest/$hfile ]; then |
29 | 29 |
cp -p htest/$hfile $tmpdir/htest/ |
30 | 30 |
fi |
b/htest/cli-tests-defs.sh | ||
---|---|---|
48 | 48 |
HTOOLS=hinfo $HBINARY "$@" |
49 | 49 |
} |
50 | 50 |
|
51 |
ALL_ROLES="hbal hscan hail hspace hinfo hcheck" |
|
51 |
hroller() { |
|
52 |
HTOOLS=hroller $HBINARY "$@" |
|
53 |
} |
|
54 |
|
|
55 |
ALL_ROLES="hbal hscan hail hspace hinfo hcheck hroller" |
b/htest/shelltests/htools-basic.test | ||
---|---|---|
23 | 23 |
>>>= 0 |
24 | 24 |
./htest/hcheck --help |
25 | 25 |
>>>= 0 |
26 |
./htest/hroller --version |
|
27 |
>>>= 0 |
|
28 |
./htest/hroller --help |
|
29 |
>>>= 0 |
b/htools/Ganeti/HTools/Program.hs | ||
---|---|---|
36 | 36 |
import qualified Ganeti.HTools.Program.Hscan as Hscan |
37 | 37 |
import qualified Ganeti.HTools.Program.Hspace as Hspace |
38 | 38 |
import qualified Ganeti.HTools.Program.Hinfo as Hinfo |
39 |
import qualified Ganeti.HTools.Program.Hroller as Hroller |
|
39 | 40 |
|
40 | 41 |
-- | Supported binaries. |
41 | 42 |
personalities :: PersonalityList Options |
42 | 43 |
personalities = |
43 |
[ ("hail", (Hail.main, Hail.options, Hail.arguments, |
|
44 |
"Ganeti IAllocator plugin that implements the instance\ |
|
45 |
\ placement and movement using the same algorithm as\ |
|
46 |
\ hbal(1)")) |
|
47 |
, ("hbal", (Hbal.main, Hbal.options, Hbal.arguments, |
|
48 |
"cluster balancer that looks at the current state of\ |
|
49 |
\ the cluster and computes a series of steps designed\ |
|
50 |
\ to bring the cluster into a better state")) |
|
51 |
, ("hcheck", (Hcheck.main, Hcheck.options, Hcheck.arguments, |
|
52 |
"cluster checker; prints information about cluster's\ |
|
53 |
\ health and checks whether a rebalance done using\ |
|
54 |
\ hbal would help")) |
|
55 |
, ("hscan", (Hscan.main, Hscan.options, Hscan.arguments, |
|
56 |
"tool for scanning clusters via RAPI and saving their\ |
|
57 |
\ data in the input format used by hbal(1) and hspace(1)")) |
|
58 |
, ("hspace", (Hspace.main, Hspace.options, Hspace.arguments, |
|
59 |
"computes how many additional instances can be fit on a\ |
|
60 |
\ cluster, while maintaining N+1 status.")) |
|
61 |
, ("hinfo", (Hinfo.main, Hinfo.options, Hinfo.arguments, |
|
62 |
"cluster information printer; it prints information\ |
|
63 |
\ about the current cluster state and its residing\ |
|
64 |
\ nodes/instances")) |
|
44 |
[ ("hail", (Hail.main, Hail.options, Hail.arguments, |
|
45 |
"Ganeti IAllocator plugin that implements the instance\ |
|
46 |
\ placement and movement using the same algorithm as\ |
|
47 |
\ hbal(1)")) |
|
48 |
, ("hbal", (Hbal.main, Hbal.options, Hbal.arguments, |
|
49 |
"cluster balancer that looks at the current state of\ |
|
50 |
\ the cluster and computes a series of steps designed\ |
|
51 |
\ to bring the cluster into a better state")) |
|
52 |
, ("hcheck", (Hcheck.main, Hcheck.options, Hcheck.arguments, |
|
53 |
"cluster checker; prints information about cluster's\ |
|
54 |
\ health and checks whether a rebalance done using\ |
|
55 |
\ hbal would help")) |
|
56 |
, ("hscan", (Hscan.main, Hscan.options, Hscan.arguments, |
|
57 |
"tool for scanning clusters via RAPI and saving their\ |
|
58 |
\ data in the input format used by hbal(1) and hspace(1)")) |
|
59 |
, ("hspace", (Hspace.main, Hspace.options, Hspace.arguments, |
|
60 |
"computes how many additional instances can be fit on a\ |
|
61 |
\ cluster, while maintaining N+1 status.")) |
|
62 |
, ("hinfo", (Hinfo.main, Hinfo.options, Hinfo.arguments, |
|
63 |
"cluster information printer; it prints information\ |
|
64 |
\ about the current cluster state and its residing\ |
|
65 |
\ nodes/instances")) |
|
66 |
, ("hroller", (Hroller.main, Hroller.options, Hroller.arguments, |
|
67 |
"cluster rolling maintenance helper; it helps scheduling\ |
|
68 |
\ node reboots in a manner that doesn't conflict with the\ |
|
69 |
\ instances' topology")) |
|
65 | 70 |
] |
b/htools/Ganeti/HTools/Program/Hroller.hs | ||
---|---|---|
1 |
{-| Cluster rolling maintenance helper. |
|
2 |
|
|
3 |
-} |
|
4 |
|
|
5 |
{- |
|
6 |
|
|
7 |
Copyright (C) 2012 Google Inc. |
|
8 |
|
|
9 |
This program is free software; you can redistribute it and/or modify |
|
10 |
it under the terms of the GNU General Public License as published by |
|
11 |
the Free Software Foundation; either version 2 of the License, or |
|
12 |
(at your option) any later version. |
|
13 |
|
|
14 |
This program is distributed in the hope that it will be useful, but |
|
15 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
17 |
General Public License for more details. |
|
18 |
|
|
19 |
You should have received a copy of the GNU General Public License |
|
20 |
along with this program; if not, write to the Free Software |
|
21 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
22 |
02110-1301, USA. |
|
23 |
|
|
24 |
-} |
|
25 |
|
|
26 |
module Ganeti.HTools.Program.Hroller |
|
27 |
( main |
|
28 |
, options |
|
29 |
, arguments |
|
30 |
) where |
|
31 |
|
|
32 |
import Ganeti.Common |
|
33 |
import Ganeti.HTools.CLI |
|
34 |
|
|
35 |
-- | Options list and functions. |
|
36 |
options :: IO [OptType] |
|
37 |
options = do |
|
38 |
luxi <- oLuxiSocket |
|
39 |
return |
|
40 |
[ luxi |
|
41 |
, oRapiMaster |
|
42 |
, oDataFile |
|
43 |
, oIAllocSrc |
|
44 |
, oOfflineNode |
|
45 |
, oVerbose |
|
46 |
, oQuiet |
|
47 |
, oNoHeaders |
|
48 |
, oSaveCluster |
|
49 |
] |
|
50 |
|
|
51 |
-- | The list of arguments supported by the program. |
|
52 |
arguments :: [ArgCompletion] |
|
53 |
arguments = [] |
|
54 |
|
|
55 |
-- | Main function. |
|
56 |
main :: Options -> [String] -> IO () |
|
57 |
main _ _ = return () |
b/man/hroller.rst | ||
---|---|---|
1 |
HROLLER(1) Ganeti | Version @GANETI_VERSION@ |
|
2 |
============================================ |
|
3 |
|
|
4 |
NAME |
|
5 |
---- |
|
6 |
|
|
7 |
hroller \- Cluster rolling maintenance scheduler for Ganeti |
|
8 |
|
|
9 |
SYNOPSIS |
|
10 |
-------- |
|
11 |
|
|
12 |
**hroller** {backend options...} [algorithm options...] [reporting options...] |
|
13 |
|
|
14 |
**hroller** \--version |
|
15 |
|
|
16 |
|
|
17 |
Backend options: |
|
18 |
|
|
19 |
{ **-m** *cluster* | **-L[** *path* **]** | **-t** *data-file* | |
|
20 |
**-I** *path* } |
|
21 |
|
|
22 |
Algorithm options: |
|
23 |
|
|
24 |
**[ -O *name...* ]** |
|
25 |
|
|
26 |
Reporting options: |
|
27 |
|
|
28 |
**[ -v... | -q ]** |
|
29 |
**[ -S *file* ]** |
|
30 |
|
|
31 |
DESCRIPTION |
|
32 |
----------- |
|
33 |
|
|
34 |
hroller is a cluster maintenance reboot scheduler. It can calculate |
|
35 |
which set of nodes can be rebooted at the same time while avoiding |
|
36 |
having both primary and secondary nodes being rebooted at the same time. |
|
37 |
|
|
38 |
OPTIONS |
|
39 |
------- |
|
40 |
|
|
41 |
Currently only standard htools options are supported. For a description of them |
|
42 |
check **htools(7)** and **hbal(1)**. |
|
43 |
|
|
44 |
BUGS |
|
45 |
---- |
|
46 |
|
|
47 |
The program does nothing. |
|
48 |
|
|
49 |
.. vim: set textwidth=72 : |
|
50 |
.. Local Variables: |
|
51 |
.. mode: rst |
|
52 |
.. fill-column: 72 |
|
53 |
.. End: |
b/man/htools.rst | ||
---|---|---|
27 | 27 |
**hinfo** |
28 | 28 |
cluster information printer |
29 | 29 |
|
30 |
**hroller** |
|
31 |
cluster rolling maintenance scheduler |
|
30 | 32 |
|
31 | 33 |
DESCRIPTION |
32 | 34 |
----------- |
33 | 35 |
|
34 |
|
|
35 | 36 |
``htools`` is a suite of tools designed to help with allocation/movement |
36 | 37 |
of instances and balancing of Ganeti clusters. ``htools`` is also the |
37 | 38 |
generic binary that must be symlinked or hardlinked under each tool's |
... | ... | |
57 | 58 |
Installed as ``hinfo``, it prints information about the current cluster |
58 | 59 |
state. |
59 | 60 |
|
61 |
Installed as ``hroller``, it helps scheduling maintenances that require |
|
62 |
node reboots on a cluster. |
|
63 |
|
|
60 | 64 |
COMMON OPTIONS |
61 | 65 |
-------------- |
62 | 66 |
|
Also available in: Unified diff