Commit 3504d6c8 authored by Guido Trotter's avatar Guido Trotter

Add hroller htools personality

This is a new personality that for the moment doesn't do anything.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 1ba25bad
......@@ -407,7 +407,7 @@ docrst = \
doc/walkthrough.rst
HS_PROGS = htools/htools htools/mon-collector
HS_BIN_ROLES = hbal hscan hspace hinfo hcheck
HS_BIN_ROLES = hbal hscan hspace hinfo hcheck hroller
HS_HTOOLS_PROGS = $(HS_BIN_ROLES) hail
HS_ALL_PROGS = \
......@@ -481,6 +481,7 @@ HS_LIB_SRCS = \
htools/Ganeti/HTools/Program/Hinfo.hs \
htools/Ganeti/HTools/Program/Hscan.hs \
htools/Ganeti/HTools/Program/Hspace.hs \
htools/Ganeti/HTools/Program/Hroller.hs \
htools/Ganeti/HTools/Types.hs \
htools/Ganeti/Hash.hs \
htools/Ganeti/JQueue.hs \
......@@ -851,6 +852,7 @@ man_MANS = \
man/hinfo.1 \
man/hscan.1 \
man/hspace.1 \
man/hroller.1 \
man/htools.1 \
man/mon-collector.7
......
......@@ -24,7 +24,7 @@ for hfile in htools ganeti-confd mon-collector; do
done
for hfile in hpc-htools test offline-test.sh cli-tests-defs.sh \
hbal hscan hspace hinfo hcheck hail hpc-mon-collector; do
hbal hscan hspace hinfo hcheck hail hroller hpc-mon-collector; do
if [ -e htest/$hfile ]; then
cp -p htest/$hfile $tmpdir/htest/
fi
......
......@@ -48,4 +48,8 @@ hcheck() {
HTOOLS=hinfo $HBINARY "$@"
}
ALL_ROLES="hbal hscan hail hspace hinfo hcheck"
hroller() {
HTOOLS=hroller $HBINARY "$@"
}
ALL_ROLES="hbal hscan hail hspace hinfo hcheck hroller"
......@@ -23,3 +23,7 @@
>>>= 0
./htest/hcheck --help
>>>= 0
./htest/hroller --version
>>>= 0
./htest/hroller --help
>>>= 0
......@@ -36,30 +36,35 @@ import qualified Ganeti.HTools.Program.Hcheck as Hcheck
import qualified Ganeti.HTools.Program.Hscan as Hscan
import qualified Ganeti.HTools.Program.Hspace as Hspace
import qualified Ganeti.HTools.Program.Hinfo as Hinfo
import qualified Ganeti.HTools.Program.Hroller as Hroller
-- | Supported binaries.
personalities :: PersonalityList Options
personalities =
[ ("hail", (Hail.main, Hail.options, Hail.arguments,
"Ganeti IAllocator plugin that implements the instance\
\ placement and movement using the same algorithm as\
\ hbal(1)"))
, ("hbal", (Hbal.main, Hbal.options, Hbal.arguments,
"cluster balancer that looks at the current state of\
\ the cluster and computes a series of steps designed\
\ to bring the cluster into a better state"))
, ("hcheck", (Hcheck.main, Hcheck.options, Hcheck.arguments,
"cluster checker; prints information about cluster's\
\ health and checks whether a rebalance done using\
\ hbal would help"))
, ("hscan", (Hscan.main, Hscan.options, Hscan.arguments,
"tool for scanning clusters via RAPI and saving their\
\ data in the input format used by hbal(1) and hspace(1)"))
, ("hspace", (Hspace.main, Hspace.options, Hspace.arguments,
"computes how many additional instances can be fit on a\
\ cluster, while maintaining N+1 status."))
, ("hinfo", (Hinfo.main, Hinfo.options, Hinfo.arguments,
"cluster information printer; it prints information\
\ about the current cluster state and its residing\
\ nodes/instances"))
[ ("hail", (Hail.main, Hail.options, Hail.arguments,
"Ganeti IAllocator plugin that implements the instance\
\ placement and movement using the same algorithm as\
\ hbal(1)"))
, ("hbal", (Hbal.main, Hbal.options, Hbal.arguments,
"cluster balancer that looks at the current state of\
\ the cluster and computes a series of steps designed\
\ to bring the cluster into a better state"))
, ("hcheck", (Hcheck.main, Hcheck.options, Hcheck.arguments,
"cluster checker; prints information about cluster's\
\ health and checks whether a rebalance done using\
\ hbal would help"))
, ("hscan", (Hscan.main, Hscan.options, Hscan.arguments,
"tool for scanning clusters via RAPI and saving their\
\ data in the input format used by hbal(1) and hspace(1)"))
, ("hspace", (Hspace.main, Hspace.options, Hspace.arguments,
"computes how many additional instances can be fit on a\
\ cluster, while maintaining N+1 status."))
, ("hinfo", (Hinfo.main, Hinfo.options, Hinfo.arguments,
"cluster information printer; it prints information\
\ about the current cluster state and its residing\
\ nodes/instances"))
, ("hroller", (Hroller.main, Hroller.options, Hroller.arguments,
"cluster rolling maintenance helper; it helps scheduling\
\ node reboots in a manner that doesn't conflict with the\
\ instances' topology"))
]
{-| Cluster rolling maintenance helper.
-}
{-
Copyright (C) 2012 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
-}
module Ganeti.HTools.Program.Hroller
( main
, options
, arguments
) where
import Ganeti.Common
import Ganeti.HTools.CLI
-- | Options list and functions.
options :: IO [OptType]
options = do
luxi <- oLuxiSocket
return
[ luxi
, oRapiMaster
, oDataFile
, oIAllocSrc
, oOfflineNode
, oVerbose
, oQuiet
, oNoHeaders
, oSaveCluster
]
-- | The list of arguments supported by the program.
arguments :: [ArgCompletion]
arguments = []
-- | Main function.
main :: Options -> [String] -> IO ()
main _ _ = return ()
HROLLER(1) Ganeti | Version @GANETI_VERSION@
============================================
NAME
----
hroller \- Cluster rolling maintenance scheduler for Ganeti
SYNOPSIS
--------
**hroller** {backend options...} [algorithm options...] [reporting options...]
**hroller** \--version
Backend options:
{ **-m** *cluster* | **-L[** *path* **]** | **-t** *data-file* |
**-I** *path* }
Algorithm options:
**[ -O *name...* ]**
Reporting options:
**[ -v... | -q ]**
**[ -S *file* ]**
DESCRIPTION
-----------
hroller is a cluster maintenance reboot scheduler. It can calculate
which set of nodes can be rebooted at the same time while avoiding
having both primary and secondary nodes being rebooted at the same time.
OPTIONS
-------
Currently only standard htools options are supported. For a description of them
check **htools(7)** and **hbal(1)**.
BUGS
----
The program does nothing.
.. vim: set textwidth=72 :
.. Local Variables:
.. mode: rst
.. fill-column: 72
.. End:
......@@ -27,11 +27,12 @@ SYNOPSIS
**hinfo**
cluster information printer
**hroller**
cluster rolling maintenance scheduler
DESCRIPTION
-----------
``htools`` is a suite of tools designed to help with allocation/movement
of instances and balancing of Ganeti clusters. ``htools`` is also the
generic binary that must be symlinked or hardlinked under each tool's
......@@ -57,6 +58,9 @@ saves it to files which can later be reused by the other roles.
Installed as ``hinfo``, it prints information about the current cluster
state.
Installed as ``hroller``, it helps scheduling maintenances that require
node reboots on a cluster.
COMMON OPTIONS
--------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment