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 <>
Reviewed-by: default avatarMichael Hanselmann <>
parent a4a6e623
......@@ -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
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