Skip to content

Dev: sbd: Leverage maintenance mode when need to restart cluster #1744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

liangxin1300
Copy link
Collaborator

@liangxin1300 liangxin1300 commented Apr 17, 2025

Changing the SBD configuration requires restarting the cluster.
This PR enables the use of the crm -F/--force option to leverage maintenance mode when a cluster restart is necessary.

# crm -F sbd configure crashdump-watchdog-timeout=60
...
INFO: Set cluster to maintenance mode
WARNING: "maintenance-mode" in crm_config is set to true, it was false
INFO: Configuring disk-based SBD
...
INFO: Restarting cluster service
INFO: BEGIN Waiting for cluster
............                                                                                                                                                                                       
INFO: END Waiting for cluster
INFO: Set cluster from maintenance mode to normal
INFO: Delete cluster property "maintenance-mode" in crm_config

@liangxin1300 liangxin1300 force-pushed the 20250417_sbd_with_maintenance branch from 6fd4e4a to cddfd6c Compare April 17, 2025 07:59
doc/crm.8.adoc Outdated
@@ -2126,6 +2126,9 @@ Additionally, it manages the configuration file for both disk-based and diskless
as well as the on-disk metadata for the disk-based scenario.
Currently, SBD management requires a running cluster.

When combined with crm `-F/--force` option, the sbd subcommand will leverage maintenance mode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When combined with crm `-F/--force` option, the sbd subcommand will leverage maintenance mode
When run with `crm -F` or `--force` option, the `sbd` subcommand will leverage maintenance mode

@liangxin1300 liangxin1300 force-pushed the 20250417_sbd_with_maintenance branch 5 times, most recently from 1ef248a to 98be6c7 Compare April 18, 2025 11:15
@liangxin1300 liangxin1300 force-pushed the 20250417_sbd_with_maintenance branch from 98be6c7 to bfb056b Compare April 18, 2025 11:39
@liangxin1300 liangxin1300 marked this pull request as ready for review April 18, 2025 11:39
Copy link
Contributor

@zzhou1 zzhou1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good coverage for the main use cases! Great!

@liangxin1300 liangxin1300 merged commit bb6c26c into ClusterLabs:master Apr 18, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants