From f0f21ec4722aa1664669caf6c4a510a6bbfe5de1 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Tue, 9 Feb 2010 11:11:17 +0100 Subject: [PATCH] Add an evac mode CLI option Signed-off-by: Iustin Pop <iustin@google.com> --- Ganeti/HTools/CLI.hs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Ganeti/HTools/CLI.hs b/Ganeti/HTools/CLI.hs index 11f9330cd..bbc73b6e2 100644 --- a/Ganeti/HTools/CLI.hs +++ b/Ganeti/HTools/CLI.hs @@ -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 }) -- GitLab