Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions crmsh/ui_sbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ def _set_crashdump_in_sysconfig(self, crashdump_watchdog_timeout=None, restore=F

return update_dict

def _is_crashdump_configured(self) -> bool:
sbd_timeout_action_configured = sbd.SBDUtils.get_sbd_value_from_config("SBD_TIMEOUT_ACTION")
return sbd_timeout_action_configured and "crashdump" in sbd_timeout_action_configured

def _check_kdump_service(self):
no_kdump = False
for node in self.cluster_nodes:
Expand Down Expand Up @@ -593,6 +597,9 @@ def do_purge(self, context, *args) -> bool:
utils.check_all_nodes_reachable("purging SBD")

if args and args[0] == "crashdump":
if not self._is_crashdump_configured():
logger.error("SBD crashdump is not configured")
return False
self._set_crashdump_option(delete=True)
update_dict = self._set_crashdump_in_sysconfig(restore=True)
if update_dict:
Expand Down