Revision 18397489 lib/cmdlib/cluster.py

b/lib/cmdlib/cluster.py
3129 3129
      feedback_fn("* Hooks Results")
3130 3130
      assert hooks_results, "invalid result from hooks"
3131 3131

  
3132
      for node_uuid in hooks_results:
3133
        res = hooks_results[node_uuid]
3134
        node = self.cfg.GetNodeInfo(node_uuid)
3132
      for node_name in hooks_results:
3133
        res = hooks_results[node_name]
3135 3134
        msg = res.fail_msg
3136 3135
        test = msg and not res.offline
3137
        self._ErrorIf(test, constants.CV_ENODEHOOKS, node.name,
3136
        self._ErrorIf(test, constants.CV_ENODEHOOKS, node_name,
3138 3137
                      "Communication failure in hooks execution: %s", msg)
3139 3138
        if res.offline or msg:
3140 3139
          # No need to investigate payload if node is offline or gave
......
3142 3141
          continue
3143 3142
        for script, hkr, output in res.payload:
3144 3143
          test = hkr == constants.HKR_FAIL
3145
          self._ErrorIf(test, constants.CV_ENODEHOOKS, node.name,
3144
          self._ErrorIf(test, constants.CV_ENODEHOOKS, node_name,
3146 3145
                        "Script %s failed, output:", script)
3147 3146
          if test:
3148 3147
            output = self._HOOKS_INDENT_RE.sub("      ", output)

Also available in: Unified diff