Skip to content

Commit 08f4830

Browse files
committed
Refactor filesystem identification logic and update resource defaults in HA configuration
1 parent ee72096 commit 08f4830

File tree

2 files changed

+30
-26
lines changed

2 files changed

+30
-26
lines changed

src/modules/filesystem_freeze.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ def __init__(self, database_sid: str) -> None:
9797
def _find_filesystem(self) -> Tuple[str, str]:
9898
"""
9999
Find the filesystem mounted on /hana/shared.
100+
This method reads the /proc/mounts file to identify the filesystem.
101+
It returns the filesystem device and the mount point as /hana/shared.
100102
101103
:return: The filesystem mounted on /hana/shared.
102104
:rtype: Tuple[str, str]
@@ -105,8 +107,11 @@ def _find_filesystem(self) -> Tuple[str, str]:
105107
with open("/proc/mounts", "r", encoding="utf-8") as mounts_file:
106108
for line in mounts_file:
107109
parts = line.split()
108-
if len(parts) > 1 and parts[1] == "/hana/shared":
109-
return parts[0], parts[1]
110+
if len(parts) > 1 and parts[1] in [
111+
"/hana/shared",
112+
f"/hana/shared/{self.database_sid}",
113+
]:
114+
return parts[0], "/hana/shared"
110115
except FileNotFoundError as ex:
111116
self.handle_error(ex)
112117
return None, None

src/roles/ha_db_hana/tasks/files/constants.yaml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -152,30 +152,29 @@ RESOURCE_DEFAULTS:
152152
resource-stickiness: "0"
153153

154154
REDHAT:
155-
stonith:
156-
AFA:
157-
instance_attributes:
158-
pcmk_delay_max: "30s"
159-
pcmk_monitor_retries: "4"
160-
pcmk_action_limit: "3"
161-
pcmk_reboot_timeout: "900"
162-
power_timeout: "240"
163-
pcmk_monitor_timeout: "120"
164-
operations:
165-
monitor:
166-
interval: "3600"
167-
timeout: "15"
168-
ISCSI:
169-
instance_attributes:
170-
pcmk_monitor_retries: "4"
171-
pcmk_action_limit: "3"
172-
pcmk_reboot_timeout: "900"
173-
power_timeout: "240"
174-
pcmk_monitor_timeout: "120"
175-
operations:
176-
monitor:
177-
interval: "600"
178-
timeout: "15"
155+
fence_agent:
156+
instance_attributes:
157+
pcmk_delay_max: "15"
158+
pcmk_monitor_retries: "4"
159+
pcmk_action_limit: "3"
160+
pcmk_reboot_timeout: "900"
161+
power_timeout: "240"
162+
pcmk_monitor_timeout: "120"
163+
operations:
164+
monitor:
165+
interval: "3600"
166+
167+
sbd_stonith:
168+
instance_attributes:
169+
pcmk_monitor_retries: "4"
170+
pcmk_action_limit: "3"
171+
pcmk_reboot_timeout: "900"
172+
power_timeout: "240"
173+
pcmk_monitor_timeout: "120"
174+
operations:
175+
monitor:
176+
interval: "600"
177+
timeout: "15"
179178

180179
topology:
181180
meta_attributes:

0 commit comments

Comments
 (0)