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