From 183974893708891cf8444a0ed191cd15214a017f Mon Sep 17 00:00:00 2001 From: Thomas Thrainer Date: Tue, 13 Aug 2013 08:55:29 +0200 Subject: [PATCH] Revert "Display node name instead of UUID in error message" This reverts commit fbff213691328562cc4029f3babaa2e72e2012c4. When running hooks, the node name is used to identify nodes, not (as wrongly assumed in the patch) the node UUID. Signed-off-by: Thomas Thrainer Reviewed-by: Guido Trotter --- lib/cmdlib/cluster.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/cmdlib/cluster.py b/lib/cmdlib/cluster.py index 083f09d..32e24de 100644 --- a/lib/cmdlib/cluster.py +++ b/lib/cmdlib/cluster.py @@ -3129,12 +3129,11 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors): feedback_fn("* Hooks Results") assert hooks_results, "invalid result from hooks" - for node_uuid in hooks_results: - res = hooks_results[node_uuid] - node = self.cfg.GetNodeInfo(node_uuid) + for node_name in hooks_results: + res = hooks_results[node_name] msg = res.fail_msg test = msg and not res.offline - self._ErrorIf(test, constants.CV_ENODEHOOKS, node.name, + self._ErrorIf(test, constants.CV_ENODEHOOKS, node_name, "Communication failure in hooks execution: %s", msg) if res.offline or msg: # No need to investigate payload if node is offline or gave @@ -3142,7 +3141,7 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors): continue for script, hkr, output in res.payload: test = hkr == constants.HKR_FAIL - self._ErrorIf(test, constants.CV_ENODEHOOKS, node.name, + self._ErrorIf(test, constants.CV_ENODEHOOKS, node_name, "Script %s failed, output:", script) if test: output = self._HOOKS_INDENT_RE.sub(" ", output) -- 1.7.10.4