Commit f0f21ec4 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add an evac mode CLI option


Signed-off-by: default avatarIustin Pop <iustin@google.com>
parent df18fdfe
......@@ -36,6 +36,7 @@ module Ganeti.HTools.CLI
, oDataFile
, oDiskMoves
, oDynuFile
, oEvacMode
, oExTags
, oExecJobs
, oIDisk
......@@ -85,6 +86,7 @@ data Options = Options
{ optDataFile :: Maybe FilePath -- ^ Path to the cluster data file
, optDiskMoves :: Bool -- ^ Allow disk moves
, optDynuFile :: Maybe FilePath -- ^ Optional file with dynamic use data
, optEvacMode :: Bool -- ^ Enable evacuation mode
, optExTags :: Maybe [String] -- ^ Tags to use for exclusion
, optExecJobs :: Bool -- ^ Execute the commands via Luxi
, optINodes :: Int -- ^ Nodes required for an instance
......@@ -115,6 +117,7 @@ defaultOptions = Options
{ optDataFile = Nothing
, optDiskMoves = True
, optDynuFile = Nothing
, optEvacMode = False
, optExTags = Nothing
, optExecJobs = False
, optINodes = 2
......@@ -158,6 +161,12 @@ oDynuFile = Option "U" ["dynu-file"]
(ReqArg (\ f opts -> Ok opts { optDynuFile = Just f }) "FILE")
"Import dynamic utilisation data from the given FILE"
oEvacMode :: OptType
oEvacMode = Option "E" ["evac-mode"]
(NoArg (\opts -> Ok opts { optEvacMode = True }))
"enable evacuation mode, where the algorithm only moves \
\ instances away from offline and drained nodes"
oExTags :: OptType
oExTags = Option "" ["exclusion-tags"]
(ReqArg (\ f opts -> Ok opts { optExTags = Just $ sepSplit ',' f })
......
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