Skip to content

sap_ha_pacemaker_cluster: stonith location constraints#954

Merged
ja9fuchs merged 1 commit into
sap-linuxlab:devfrom
ja9fuchs:fix-gcp
Feb 11, 2025
Merged

sap_ha_pacemaker_cluster: stonith location constraints#954
ja9fuchs merged 1 commit into
sap-linuxlab:devfrom
ja9fuchs:fix-gcp

Conversation

@ja9fuchs
Copy link
Copy Markdown
Contributor

@ja9fuchs ja9fuchs commented Feb 4, 2025

  • Moved default stonith setup into a block to share conditionals.
  • Removed 1 block conditional which is not needed for the block that only applies when the role platform defaults are used.

New task
Adding default location constraints when fence resources are defined per host.
This prevents per-host fence resources from running on the same, targeted node.

Currently GCP has a default stonith definition that works this way.

Result on GCP:

Location Constraints:
  resource 'rsc_fence_gce_hana01' avoids node 'hana01' with score INFINITY
  resource 'rsc_fence_gce_hana02' avoids node 'hana02' with score INFINITY
  * rsc_fence_gce_hana01        (stonith:fence_gce):     Started hana02
  * rsc_fence_gce_hana02        (stonith:fence_gce):     Started hana01

Tested (on RHEL)
GCP: correct default resource and constraints configuration
AWS: runs the default fence resource task, then skips the constraints task as expected

Reference
https://cloud.google.com/solutions/sap/docs/sap-hana-ha-config-rhel#create_the_fencing_device_resources

- Moved default stonith setup into block to share conditionals.
- New: Default location constraints when fence resources are defined
  per host - prevent per-host-fence resources from running on the
  targeted node.
@ja9fuchs ja9fuchs requested a review from marcelmamula February 4, 2025 17:52
@ja9fuchs ja9fuchs self-assigned this Feb 4, 2025
Copy link
Copy Markdown
Contributor

@marcelmamula marcelmamula left a comment

Choose a reason for hiding this comment

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

LGTM. Naming could be improved, but it works.
Tested on SLES4SAP 15 SP6 on GCP.

@ja9fuchs ja9fuchs merged commit 5223c50 into sap-linuxlab:dev Feb 11, 2025
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