Commit 3141ad3b authored by Luca Bigliardi's avatar Luca Bigliardi
Browse files

LUDestroyCluster: run hooks

Run post hooks on master node before it's removed.
Signed-off-by: default avatarLuca Bigliardi <>
Reviewed-by: default avatarIustin Pop <>
parent b2c750a4
......@@ -836,6 +836,14 @@ class LUDestroyCluster(LogicalUnit):
master = self.cfg.GetMasterNode()
# Run post hooks on master node before it's removed
hm = self.proc.hmclass(self.rpc.call_hooks_runner, self)
hm.RunPhase(constants.HOOKS_PHASE_POST, [master])
self.LogWarning("Errors occurred running hooks on %s" % master)
result = self.rpc.call_node_stop_master(master, False)
result.Raise("Could not disable the master role")
priv_key, pub_key, _ = ssh.GetUserFiles(constants.GANETI_RUNAS)
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