Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-ganeti
Commits
f0f21ec4
Commit
f0f21ec4
authored
Feb 09, 2010
by
Iustin Pop
Browse files
Add an evac mode CLI option
Signed-off-by:
Iustin Pop
<
iustin@google.com
>
parent
df18fdfe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Ganeti/HTools/CLI.hs
View file @
f0f21ec4
...
...
@@ -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
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment