Revision f56618e0 lib/config.py
b/lib/config.py | ||
---|---|---|
859 | 859 |
os.rename(name, destination) |
860 | 860 |
self.write_count += 1 |
861 | 861 |
|
862 |
# and redistribute the config file |
|
862 |
# and redistribute the config file to master candidates
|
|
863 | 863 |
self._DistributeConfig() |
864 | 864 |
|
865 | 865 |
# Write ssconf files on all nodes (including locally) |
... | ... | |
877 | 877 |
associated value |
878 | 878 |
|
879 | 879 |
""" |
880 |
node_list = "\n".join(utils.NiceSort(self._UnlockedGetNodeList())) |
|
880 |
node_list = utils.NiceSort(self._UnlockedGetNodeList()) |
|
881 |
mc_list = [self._UnlockedGetNodeInfo(name) for name in node_list] |
|
882 |
mc_list = [node.name for node in mc_list if node.master_candidate] |
|
883 |
node_list = "\n".join(node_list) |
|
884 |
mc_list = "\n".join(mc_list) |
|
885 |
|
|
881 | 886 |
cluster = self._config_data.cluster |
882 | 887 |
return { |
883 | 888 |
constants.SS_CLUSTER_NAME: cluster.cluster_name, |
884 | 889 |
constants.SS_FILE_STORAGE_DIR: cluster.file_storage_dir, |
890 |
constants.SS_MASTER_CANDIDATES: mc_list, |
|
885 | 891 |
constants.SS_MASTER_IP: cluster.master_ip, |
886 | 892 |
constants.SS_MASTER_NETDEV: cluster.master_netdev, |
887 | 893 |
constants.SS_MASTER_NODE: cluster.master_node, |
Also available in: Unified diff