diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 4f8a8f296969a9d73d62248de11aeeb52ac08246..a063e9da41c0f169c095d04fdd82509db8fe11bb 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -3203,7 +3203,7 @@ class LUSetNodeParams(LogicalUnit): # If we're being deofflined/drained, we'll MC ourself if needed if (deoffline_or_drain and not offline_or_drain and not - self.op.master_candidate == True): + self.op.master_candidate == True and not node.master_candidate): self.op.master_candidate = _DecideSelfPromotion(self) if self.op.master_candidate: self.LogInfo("Autopromoting node to master candidate")