Commit 8fe9239e authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix behaviour of gnt-node modify -C no

The current check on whether we require auto_promote or not is wrong, as
we check whether we will have exactly the correct number of master
candidates left. But it is fine if we have more (e.g. when CPS=10 and
mc_remaning=19) than the current number, and in that case we shouldn't
require auto promotion.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 6b7d5878
......@@ -3339,7 +3339,7 @@ class LUSetNodeParams(LogicalUnit):
# candidates
(mc_remaining, mc_should, _) = \
if mc_remaining != mc_should:
if mc_remaining < mc_should:
raise errors.OpPrereqError("Not enough master candidates, please"
" pass auto_promote to allow promotion",
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