Skip to content
Snippets Groups Projects
Commit 146b37eb authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix secondary node selection for existing N+1


In case a secondary node is already N+1 failed, currently the node
selection will accept a node that cannot start (at all) the new instance
as valid. This is wrong, so we add a new simple check to prevent the
case of instance's memory size being higher than the node's free (not
available, which might be lower than 0 for N+1 failures) memory.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent a4a6e623
No related branches found
No related tags found
No related merge requests found
......@@ -374,6 +374,7 @@ addSec t inst pdx =
T.dskWeight (Instance.util inst) }
in case () of
_ | new_dsk <= 0 || mDsk t > new_dp -> T.OpFail T.FailDisk
| Instance.mem inst >= old_mem -> T.OpFail T.FailMem
| new_failn1 && not (failN1 t) -> T.OpFail T.FailMem
| otherwise ->
let new_slist = iname:sList t
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment