Skip to content

Commit

Permalink
Dev: ocfs2: Drop support for configuring ocfs2 (jsc#PED-11038) (#1574)
Browse files Browse the repository at this point in the history
  • Loading branch information
liangxin1300 authored Oct 25, 2024
2 parents 0573690 + 7998730 commit e3d8b01
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 1,082 deletions.
30 changes: 2 additions & 28 deletions crmsh/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
from . import userdir
from .constants import SSH_OPTION, QDEVICE_HELP_INFO, STONITH_TIMEOUT_DEFAULT,\
REJOIN_COUNT, REJOIN_INTERVAL, PCMK_DELAY_MAX, CSYNC2_SERVICE, WAIT_TIMEOUT_MS_DEFAULT
from . import ocfs2
from . import qdevice
from . import parallax
from . import log
Expand Down Expand Up @@ -71,7 +70,7 @@
"/etc/samba/smb.conf", SYSCONFIG_NFS, SYSCONFIG_PCMK, SYSCONFIG_SBD, PCMK_REMOTE_AUTH, WATCHDOG_CFG,
PROFILES_FILE, CRM_CFG, SBD_SYSTEMD_DELAY_START_DIR)

INIT_STAGES_EXTERNAL = ("ssh", "csync2", "corosync", "sbd", "cluster", "ocfs2", "admin", "qdevice")
INIT_STAGES_EXTERNAL = ("ssh", "csync2", "corosync", "sbd", "cluster", "admin", "qdevice")
INIT_STAGES_INTERNAL = ("csync2_remote", "qnetd_remote", "remote_auth")
INIT_STAGES_ALL = INIT_STAGES_EXTERNAL + INIT_STAGES_INTERNAL
JOIN_STAGES_EXTERNAL = ("ssh", "csync2", "ssh_merge", "cluster")
Expand Down Expand Up @@ -112,9 +111,6 @@ def __init__(self):
self.qdevice_heuristics = None
self.qdevice_heuristics_mode = None
self.qdevice_rm_flag = None
self.ocfs2_devices = []
self.use_cluster_lvm2 = None
self.mount_point = None
self.cluster_node = None
self.force = None
self.arbitrator = None
Expand Down Expand Up @@ -264,7 +260,7 @@ def _validate_stage(self):
if self.type == "init":
if self.stage not in INIT_STAGES_ALL:
utils.fatal(f"Invalid stage: {self.stage}(available stages: {', '.join(INIT_STAGES_EXTERNAL)})")
if self.stage in ("admin", "qdevice", "ocfs2") and not self.cluster_is_running:
if self.stage in ("admin", "qdevice") and not self.cluster_is_running:
utils.fatal(f"Cluster is inactive, can't run '{self.stage}' stage")
if self.stage in ("corosync", "cluster") and self.cluster_is_running:
utils.fatal(f"Cluster is active, can't run '{self.stage}' stage")
Expand All @@ -283,8 +279,6 @@ def validate_option(self):
"""
if self.qdevice_inst:
self.qdevice_inst.valid_qdevice_options()
if self.ocfs2_devices or self.stage == "ocfs2":
ocfs2.OCFS2Manager.verify_ocfs2(self)
if not self.skip_csync2 and self.type == "init":
self.skip_csync2 = utils.get_boolean(os.getenv("SKIP_CSYNC2_SYNC"))
if self.skip_csync2 and self.stage:
Expand Down Expand Up @@ -1402,16 +1396,6 @@ def init_sbd():
_context.sbd_manager.sbd_init()


def init_ocfs2():
"""
OCFS2 configure process
"""
if not _context.ocfs2_devices:
return
ocfs2_manager = ocfs2.OCFS2Manager(_context)
ocfs2_manager.init_ocfs2()


def init_cluster():
"""
Initial cluster configuration.
Expand Down Expand Up @@ -2228,7 +2212,6 @@ def bootstrap_init(context):
init_cluster()
init_admin()
init_qdevice()
init_ocfs2()
except lock.ClaimLockError as err:
utils.fatal(err)

Expand Down Expand Up @@ -2326,7 +2309,6 @@ def bootstrap_join(context):
join_csync2(cluster_node, remote_user)
join_ssh_merge(cluster_node, remote_user)
probe_partitions()
join_ocfs2(cluster_node, remote_user)
join_cluster(cluster_node, remote_user)
except (lock.SSHError, lock.ClaimLockError) as err:
utils.fatal(err)
Expand All @@ -2338,14 +2320,6 @@ def bootstrap_finished():
logger.info("Done (log saved to %s on %s)", log.CRMSH_LOG_FILE, utils.this_node())


def join_ocfs2(peer_host, peer_user):
"""
If init node configured OCFS2 device, verify that device on join node
"""
ocfs2_inst = ocfs2.OCFS2Manager(_context)
ocfs2_inst.join_ocfs2(peer_host)


def remove_qdevice() -> None:
"""
Remove qdevice service and configuration from cluster
Expand Down
Loading

0 comments on commit e3d8b01

Please sign in to comment.