Commit c9064964 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix master role stop on cluster destroy

Currently the cluster destroy doesn't remove the master role, which
means that the IP address of the cluster remains assigned to the master

This patch fixes this and also a docstring in backend.StopMaster().

Reviewed-by: imsnah
parent caea3b32
......@@ -64,9 +64,7 @@ def StartMaster():
def StopMaster():
"""Deactivate this node as master.
This does two things:
- run the master stop script
- remove link to master cron script.
This runs the master stop script.
result = utils.RunCmd([constants.MASTER_SCRIPT, "-d", "stop"])
......@@ -632,6 +632,8 @@ class LUDestroyCluster(NoHooksLU):
master = self.sstore.GetMasterNode()
if not rpc.call_node_stop_master(master):
raise errors.OpExecError("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