Commit 55cf7d83 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix cluster rename

With the recent configwriter/ssconf changes, cluster rename becomes
trivial. This patch gets rids of the code and just updates the cluster

Reviewed-by: imsnah
parent 781de953
......@@ -1174,25 +1174,10 @@ class LURenameCluster(LogicalUnit):
raise errors.OpExecError("Could not disable the master role")
# modify the sstore
# TODO: sstore
ss.SetKey(ss.SS_MASTER_IP, ip)
ss.SetKey(ss.SS_CLUSTER_NAME, clustername)
# Distribute updated ss config to all nodes
myself = self.cfg.GetNodeInfo(master)
dist_nodes = self.cfg.GetNodeList()
if in dist_nodes:
logging.debug("Copying updated ssconf data to all nodes")
for keyname in [ss.SS_CLUSTER_NAME, ss.SS_MASTER_IP]:
fname = ss.KeyToFilename(keyname)
result = self.rpc.call_upload_file(dist_nodes, fname)
for to_node in dist_nodes:
if result[to_node].failed or not result[to_node].data:
self.LogWarning("Copy of file %s to node %s failed",
fname, to_node)
cluster = self.cfg.GetClusterInfo()
cluster.cluster_name = clustername
cluster.master_ip = ip
result = self.rpc.call_node_start_master(master, False)
if result.failed or not
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