LGTM, thanks

On Mon, 30 Mar 2015 at 15:43 'Klaus Aehlig' via ganeti-devel <
[email protected]> wrote:

> ...as the master node should never lose it's master capability.
> Fixes issue 1023.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  lib/cmdlib/node.py | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/lib/cmdlib/node.py b/lib/cmdlib/node.py
> index 89a9aee..5b90ad3 100644
> --- a/lib/cmdlib/node.py
> +++ b/lib/cmdlib/node.py
> @@ -647,6 +647,9 @@ class LUNodeSetParams(LogicalUnit):
>
>      # If we're no longer master capable, we'll demote ourselves from MC
>      if self.op.master_capable is False and node.master_candidate:
> +      if self.op.node_uuid == self.cfg.GetMasterNode():
> +        raise errors.OpPrereqError("Master must remain master capable",
> +                                   errors.ECODE_STATE)
>        self.LogInfo("Demoting from master candidate")
>        self.op.master_candidate = False
>
> --
> 2.2.0.rc0.207.ga3a616c
>
>

Reply via email to