Commit 8ddee5b6 authored by Klaus Aehlig's avatar Klaus Aehlig

Extend OpGroupEvacuate by a ForceFailover paramter

Add a parameter to OpGroupEvacuate to force failovers to be
used instead of migrations. This can be useful, if a group
is evacuated to another with different hardware.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
parent 63c875e7
......@@ -743,6 +743,7 @@ $(genOpCode "OpCode"
, pIallocator
, pTargetGroups
, pSequential
, pForceFailover
],
"group_name")
, ("OpOsDiagnose",
......
......@@ -210,6 +210,7 @@ module Ganeti.OpParams
, pReplaceDisksMode
, pReplaceDisksList
, pAllowFailover
, pForceFailover
, pDelayDuration
, pDelayOnMaster
, pDelayOnNodes
......@@ -1244,6 +1245,11 @@ pAllowFailover =
withDoc "Whether we can fallback to failover if migration is not possible" $
defaultFalse "allow_failover"
pForceFailover :: Field
pForceFailover =
withDoc "Disallow migration moves and always use failovers" $
defaultFalse "force_failover"
pMoveTargetNode :: Field
pMoveTargetNode =
withDoc "Target node for instance move" .
......
......@@ -317,7 +317,7 @@ instance Arbitrary OpCodes.OpCode where
OpCodes.OpGroupRename <$> genNameNE <*> genNameNE
"OP_GROUP_EVACUATE" ->
OpCodes.OpGroupEvacuate <$> genNameNE <*> arbitrary <*>
genMaybe genNameNE <*> genMaybe genNamesNE <*> arbitrary
genMaybe genNameNE <*> genMaybe genNamesNE <*> arbitrary <*> arbitrary
"OP_OS_DIAGNOSE" ->
OpCodes.OpOsDiagnose <$> genFieldsNE <*> genNamesNE
"OP_EXT_STORAGE_DIAGNOSE" ->
......
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