Commit 5c465a95 authored by Iustin Pop's avatar Iustin Pop

Export the maintain_node_health option in ssconf

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 3953242f
......@@ -1389,6 +1389,7 @@ class ConfigWriter:
constants.SS_INSTANCE_LIST: instance_data,
constants.SS_RELEASE_VERSION: constants.RELEASE_VERSION,
constants.SS_HYPERVISOR_LIST: hypervisor_list,
constants.SS_MAINTAIN_NODE_HEALTH: str(cluster.maintain_node_health),
}
@locking.ssynchronized(_config_lock, shared=1)
......
......@@ -669,6 +669,7 @@ SS_ONLINE_NODES = "online_nodes"
SS_INSTANCE_LIST = "instance_list"
SS_RELEASE_VERSION = "release_version"
SS_HYPERVISOR_LIST = "hypervisor_list"
SS_MAINTAIN_NODE_HEALTH = "maintain_node_health"
# cluster wide default parameters
DEFAULT_ENABLED_HYPERVISOR = HT_XEN_PVM
......
......@@ -283,6 +283,7 @@ class SimpleStore(object):
constants.SS_INSTANCE_LIST,
constants.SS_RELEASE_VERSION,
constants.SS_HYPERVISOR_LIST,
constants.SS_MAINTAIN_NODE_HEALTH,
)
_MAX_SIZE = 131072
......@@ -432,6 +433,14 @@ class SimpleStore(object):
nl = data.splitlines(False)
return nl
def GetMaintainNodeHealth(self):
"""Return the value of the maintain_node_health option.
"""
data = self._ReadFile(constants.SS_MAINTAIN_NODE_HEALTH)
# we rely on the bool serialization here
return data == "True"
def GetMasterAndMyself(ss=None):
"""Get the master node and my own hostname.
......
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