Commit 5d60b3bd authored by Iustin Pop's avatar Iustin Pop
Browse files

Add a new ssconf file with the cluster tags

Since the cluster tags are/should be more-or-less static, add them as an
ssconf key, so that querying them is possible without creating a
job/requiring the masterd to be running.

Reviewed-by: imsnah
parent e566ddbd
......@@ -1128,8 +1128,10 @@ class ConfigWriter:
node_data = fn(node_names)
cluster = self._config_data.cluster
cluster_tags = fn(cluster.GetTags())
return {
constants.SS_CLUSTER_NAME: cluster.cluster_name,
constants.SS_CLUSTER_TAGS: cluster_tags,
constants.SS_FILE_STORAGE_DIR: cluster.file_storage_dir,
constants.SS_MASTER_CANDIDATES: mc_data,
constants.SS_MASTER_IP: cluster.master_ip,
......
......@@ -458,6 +458,7 @@ MAX_DISKS = 16
# SSCONF keys
SS_CLUSTER_NAME = "cluster_name"
SS_CLUSTER_TAGS = "cluster_tags"
SS_FILE_STORAGE_DIR = "file_storage_dir"
SS_MASTER_CANDIDATES = "master_candidates"
SS_MASTER_IP = "master_ip"
......
......@@ -126,6 +126,7 @@ class SimpleStore(object):
_SS_FILEPREFIX = "ssconf_"
_VALID_KEYS = (
constants.SS_CLUSTER_NAME,
constants.SS_CLUSTER_TAGS,
constants.SS_FILE_STORAGE_DIR,
constants.SS_MASTER_CANDIDATES,
constants.SS_MASTER_IP,
......
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