From 8b437a6e76d39af4f44c21a1663126f32762878b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Nussbaumer?= <rn@google.com> Date: Wed, 26 Jan 2011 11:51:33 +0100 Subject: [PATCH] Rephrasing two error messages for auto promotion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using auto_promote or auto-promote can lead to confusion on using the user facing interfaces. While auto-promote is fine for CLI it's not for RAPI and vice-versa. This patch should eliminate this confusion. Signed-off-by: RenΓ© Nussbaumer <rn@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/cmdlib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 5a2ca6863..655c25f94 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -4135,15 +4135,15 @@ class LUSetNodeParams(LogicalUnit): errors.ECODE_STATE) if node.master_candidate and self.might_demote and not self.lock_all: - assert not self.op.auto_promote, "auto-promote set but lock_all not" + assert not self.op.auto_promote, "auto_promote set but lock_all not" # check if after removing the current node, we're missing master # candidates (mc_remaining, mc_should, _) = \ self.cfg.GetMasterCandidateStats(exceptions=[node.name]) if mc_remaining < mc_should: raise errors.OpPrereqError("Not enough master candidates, please" - " pass auto_promote to allow promotion", - errors.ECODE_STATE) + " pass auto promote option to allow" + " promotion", errors.ECODE_STATE) self.old_flags = old_flags = (node.master_candidate, node.drained, node.offline) -- GitLab