LGTM

Thanks,

Guido
On 12 Aug 2013 15:59, "Thomas Thrainer" <[email protected]> wrote:

> The hooks callback in LUClusterGroupVerify misinterpreted the key in the
> node result as name instead of node UUID. This patch fixes this, which
> leads to more user friendly error messages.
>
> Signed-off-by: Thomas Thrainer <[email protected]>
> ---
>  lib/cmdlib/cluster.py | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/lib/cmdlib/cluster.py b/lib/cmdlib/cluster.py
> index 32e24de..083f09d 100644
> --- a/lib/cmdlib/cluster.py
> +++ b/lib/cmdlib/cluster.py
> @@ -3129,11 +3129,12 @@ class LUClusterVerifyGroup(LogicalUnit,
> _VerifyErrors):
>        feedback_fn("* Hooks Results")
>        assert hooks_results, "invalid result from hooks"
>
> -      for node_name in hooks_results:
> -        res = hooks_results[node_name]
> +      for node_uuid in hooks_results:
> +        res = hooks_results[node_uuid]
> +        node = self.cfg.GetNodeInfo(node_uuid)
>          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
> @@ -3141,7 +3142,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.8.3
>
>

Reply via email to