Commit 8fcfb767 authored by Guido Trotter's avatar Guido Trotter
Browse files

Add --no-instance-moves cli htools option



This option doesn't currently do anything.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 297b0cd3
......@@ -38,6 +38,7 @@ module Ganeti.HTools.CLI
-- * The options
, oDataFile
, oDiskMoves
, oInstMoves
, oDynuFile
, oEvacMode
, oExInst
......@@ -94,6 +95,7 @@ defaultLuxiSocket = C.masterSocket
data Options = Options
{ optDataFile :: Maybe FilePath -- ^ Path to the cluster data file
, optDiskMoves :: Bool -- ^ Allow disk moves
, optInstMoves :: Bool -- ^ Allow instance moves
, optDynuFile :: Maybe FilePath -- ^ Optional file with dynamic use data
, optEvacMode :: Bool -- ^ Enable evacuation mode
, optExInst :: [String] -- ^ Instances to be excluded
......@@ -130,6 +132,7 @@ defaultOptions :: Options
defaultOptions = Options
{ optDataFile = Nothing
, optDiskMoves = True
, optInstMoves = True
, optDynuFile = Nothing
, optEvacMode = False
, optExInst = []
......@@ -175,6 +178,13 @@ oDiskMoves = Option "" ["no-disk-moves"]
"disallow disk moves from the list of allowed instance changes,\
\ thus allowing only the 'cheap' failover/migrate operations"
oInstMoves :: OptType
oInstMoves = Option "" ["no-instance-moves"]
(NoArg (\ opts -> Ok opts { optInstMoves = False}))
"disallow instance (primary node) moves from the list of allowed,\
\ instance changes, thus allowing only slower, but sometimes\
\ safer, drbd secondary changes"
oDynuFile :: OptType
oDynuFile = Option "U" ["dynu-file"]
(ReqArg (\ f opts -> Ok opts { optDynuFile = Just f }) "FILE")
......
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