Commit 33be7576 authored by Andrea Spadaccini's avatar Andrea Spadaccini
Browse files

Add use_external_mip_script cluster parameter



Add the use_external_mip_script cluster parameter, that represents
whether the master IP address turnup/turndown procedures must use a
script provided by the user (True) or the one provided by Ganeti
(False).
Signed-off-by: default avatarAndrea Spadaccini <spadaccio@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent d9eefcfa
......@@ -5587,6 +5587,7 @@ class LUClusterQuery(NoHooksLU):
"candidate_pool_size": cluster.candidate_pool_size,
"master_netdev": cluster.master_netdev,
"master_netmask": cluster.master_netmask,
"use_external_mip_script": cluster.use_external_mip_script,
"volume_group_name": cluster.volume_group_name,
"drbd_usermode_helper": cluster.drbd_usermode_helper,
"file_storage_dir": cluster.file_storage_dir,
......
......@@ -896,6 +896,13 @@ class ConfigWriter:
"""
return self._config_data.cluster.master_netmask
@locking.ssynchronized(_config_lock, shared=1)
def GetUseExternalMipScript(self):
"""Get flag representing whether to use the external master IP setup script.
"""
return self._config_data.cluster.use_external_mip_script
@locking.ssynchronized(_config_lock, shared=1)
def GetFileStorageDir(self):
"""Get the file storage dir for this cluster.
......
......@@ -1095,6 +1095,7 @@ class Cluster(TaggableObject):
"master_ip",
"master_netdev",
"master_netmask",
"use_external_mip_script",
"cluster_name",
"file_storage_dir",
"shared_file_storage_dir",
......@@ -1205,6 +1206,9 @@ class Cluster(TaggableObject):
if self.shared_file_storage_dir is None:
self.shared_file_storage_dir = ""
if self.use_external_mip_script is None:
self.use_external_mip_script = False
def ToDict(self):
"""Custom function for cluster.
......
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