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

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" ...@@ -743,6 +743,7 @@ $(genOpCode "OpCode"
, pIallocator , pIallocator
, pTargetGroups , pTargetGroups
, pSequential , pSequential
, pForceFailover
], ],
"group_name") "group_name")
, ("OpOsDiagnose", , ("OpOsDiagnose",
......
...@@ -210,6 +210,7 @@ module Ganeti.OpParams ...@@ -210,6 +210,7 @@ module Ganeti.OpParams
, pReplaceDisksMode , pReplaceDisksMode
, pReplaceDisksList , pReplaceDisksList
, pAllowFailover , pAllowFailover
, pForceFailover
, pDelayDuration , pDelayDuration
, pDelayOnMaster , pDelayOnMaster
, pDelayOnNodes , pDelayOnNodes
...@@ -1244,6 +1245,11 @@ pAllowFailover = ...@@ -1244,6 +1245,11 @@ pAllowFailover =
withDoc "Whether we can fallback to failover if migration is not possible" $ withDoc "Whether we can fallback to failover if migration is not possible" $
defaultFalse "allow_failover" defaultFalse "allow_failover"
pForceFailover :: Field
pForceFailover =
withDoc "Disallow migration moves and always use failovers" $
defaultFalse "force_failover"
pMoveTargetNode :: Field pMoveTargetNode :: Field
pMoveTargetNode = pMoveTargetNode =
withDoc "Target node for instance move" . withDoc "Target node for instance move" .
......
...@@ -317,7 +317,7 @@ instance Arbitrary OpCodes.OpCode where ...@@ -317,7 +317,7 @@ instance Arbitrary OpCodes.OpCode where
OpCodes.OpGroupRename <$> genNameNE <*> genNameNE OpCodes.OpGroupRename <$> genNameNE <*> genNameNE
"OP_GROUP_EVACUATE" -> "OP_GROUP_EVACUATE" ->
OpCodes.OpGroupEvacuate <$> genNameNE <*> arbitrary <*> OpCodes.OpGroupEvacuate <$> genNameNE <*> arbitrary <*>
genMaybe genNameNE <*> genMaybe genNamesNE <*> arbitrary genMaybe genNameNE <*> genMaybe genNamesNE <*> arbitrary <*> arbitrary
"OP_OS_DIAGNOSE" -> "OP_OS_DIAGNOSE" ->
OpCodes.OpOsDiagnose <$> genFieldsNE <*> genNamesNE OpCodes.OpOsDiagnose <$> genFieldsNE <*> genNamesNE
"OP_EXT_STORAGE_DIAGNOSE" -> "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