Commit 23dc58d5 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Add an option for restricted migration



This option will allow node evacuation with migrations only
off the nodes to be evacuated.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent ee63f1d1
......@@ -51,6 +51,7 @@ module Ganeti.HTools.CLI
, oMonD
, oMonDDataFile
, oEvacMode
, oRestrictedMigrate
, oExInst
, oExTags
, oExecJobs
......@@ -129,6 +130,7 @@ data Options = Options
, optMonDFile :: Maybe FilePath -- ^ Optional file with data provided
-- ^ by MonDs
, optEvacMode :: Bool -- ^ Enable evacuation mode
, optRestrictedMigrate :: Bool -- ^ Disallow replace-primary moves
, optExInst :: [String] -- ^ Instances to be excluded
, optExTags :: Maybe [String] -- ^ Tags to use for exclusion
, optExecJobs :: Bool -- ^ Execute the commands via Luxi
......@@ -186,6 +188,7 @@ defaultOptions = Options
, optMonD = False
, optMonDFile = Nothing
, optEvacMode = False
, optRestrictedMigrate = False
, optExInst = []
, optExTags = Nothing
, optExecJobs = False
......@@ -359,6 +362,14 @@ oEvacMode =
\ instances away from offline and drained nodes",
OptComplNone)
oRestrictedMigrate :: OptType
oRestrictedMigrate =
(Option "" ["restricted-migration"]
(NoArg (\opts -> Ok opts { optRestrictedMigrate = True }))
"disallow replace-primary moves (aka frf-moves); in evacuation mode, this\
\ will ensure that the only migrations are off the drained nodes",
OptComplNone)
oExInst :: OptType
oExInst =
(Option "" ["exclude-instances"]
......
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