Commit a58b4e0a authored by Klaus Aehlig's avatar Klaus Aehlig

Add an option to accept existing N+1 violations

This option will be used to tell hspace to ignore
existing N+1 violations and allocate on all non-affected
nodes as usual.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent 3e7f7066
......@@ -62,6 +62,7 @@ module Ganeti.HTools.CLI
, oIgnoreDyn
, oIgnoreNonRedundant
, oIndependentGroups
, oAcceptExisting
, oInstMoves
, oJobDelay
, genOLuxiSocket
......@@ -128,6 +129,7 @@ data Options = Options
, optDynuFile :: Maybe FilePath -- ^ Optional file with dynamic use data
, optIgnoreDynu :: Bool -- ^ Do not use dynamic use data
, optIndependentGroups :: Bool -- ^ consider groups independently
, optAcceptExisting :: Bool -- ^ accept existing N+1 violations
, optMonD :: Bool -- ^ Query MonDs
, optMonDFile :: Maybe FilePath -- ^ Optional file with data provided
-- ^ by MonDs
......@@ -184,6 +186,7 @@ defaultOptions = Options
, optDiskMoves = True
, optInstMoves = True
, optIndependentGroups = False
, optAcceptExisting = False
, optDiskTemplate = Nothing
, optSpindleUse = Nothing
, optIgnoreDynu = False
......@@ -364,6 +367,13 @@ oIndependentGroups =
"Consider groups independently",
OptComplNone)
oAcceptExisting :: OptType
oAcceptExisting =
(Option "" ["accept-existing-errors"]
(NoArg (\ opts -> Ok opts {optAcceptExisting = True}))
"Accept existing N+1 violations; just don't add new ones",
OptComplNone)
oEvacMode :: OptType
oEvacMode =
(Option "E" ["evac-mode"]
......
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