Merge "Restrict ceph mon hook execution"
This commit is contained in:
@@ -304,13 +304,23 @@ class RemoveKubernetesConfigSymlinkHook(BaseHook):
|
||||
raise
|
||||
|
||||
|
||||
# TODO(heitormatsui): delete in the future, not needed for stx-10 -> <future-releases>
|
||||
class RemoveCephMonHook(BaseHook):
|
||||
"""
|
||||
Remove additional ceph-mon added for each controller
|
||||
"""
|
||||
PMON_FILE = "/etc/pmon.d/ceph-fixed-mon.conf"
|
||||
|
||||
def __init__(self, attrs):
|
||||
super().__init__(attrs)
|
||||
self._major_release = None
|
||||
if "major_release" in attrs:
|
||||
self._major_release = attrs.get("major_release")
|
||||
|
||||
def run(self):
|
||||
# (DX only) on 22.12 there is 1 mon, on 24.09 there are 3
|
||||
# so only in 24.09 -> 22.12 rollback this hook is needed
|
||||
if self._major_release == "22.12":
|
||||
system_type = utils.get_platform_conf("system_type")
|
||||
system_mode = utils.get_platform_conf("system_mode")
|
||||
nodetype = utils.get_platform_conf("nodetype")
|
||||
|
Reference in New Issue
Block a user