Commit 3cb5c1e3 authored by Luca Bigliardi's avatar Luca Bigliardi
Browse files

LURemoveNode: no logs running post on removed node



Do not log results from hooks ran on the removed node as now it's done by
RunPhase.
Signed-off-by: default avatarLuca Bigliardi <shammash@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 8c4b9364
......@@ -2203,21 +2203,8 @@ class LURemoveNode(LogicalUnit):
hm = self.proc.hmclass(self.rpc.call_hooks_runner, self)
try:
h_results = hm.RunPhase(constants.HOOKS_PHASE_POST, [node.name])
finally:
res = h_results[node.name]
if res.fail_msg:
if not res.offline:
self.LogError("Failed to start hooks on %s: %s" %
(node.name, res.fail_msg))
for script, hkr, output in res.payload:
if hkr != constants.HKR_FAIL:
continue
if output:
self.LogWarning("On %s script %s failed, output: %s" %
(node.name, script, output))
else:
self.LogWarning("On %s script %s failed (no output)." %
(node.name, script))
except:
self.LogWarning("Errors occurred running hooks on %s" % node.name)
result = self.rpc.call_node_leave_cluster(node.name)
msg = result.fail_msg
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment