sap-linuxlab / community.sap_install

Automation for SAP - Collection of Ansible Roles for various SAP software installation
Apache License 2.0
55 stars 57 forks source link

sap_ha_pacemaker_cluster: Azure health-azure-events, pcmk_host_map #832

Open marcelmamula opened 3 months ago

marcelmamula commented 3 months ago
  1. Implement Azure specific HA steps as documented:

@marcelmamula @ja9fuchs @sean-freeman

SLES: https://learn.microsoft.com/en-us/azure/sap/workloads/high-availability-guide-suse-pacemaker?tabs=msi#configure-pacemaker-for-azure-scheduled-events

sudo crm configure property node-health-strategy=custom
sudo crm configure location loc_azure_health \
/'!health-.*'/ rule '#health-azure': defined '#uname'

sudo crm_attribute --node prod-cl1-0 --name '#health-azure' --update 0
sudo crm_attribute --node prod-cl1-1 --name '#health-azure' --update 0

sudo crm configure primitive health-azure-events ocf:heartbeat:azure-events-az \ 
meta allow-unhealthy-nodes=true failure-timeout=120s \ 
op start start-delay=60s \ 
op monitor interval=10s

sudo crm configure clone health-azure-events-cln health-azure-events

RHEL: https://learn.microsoft.com/en-us/azure/sap/workloads/high-availability-guide-rhel-pacemaker?tabs=msi#configure-pacemaker-for-azure-scheduled-events

sudo pcs property set node-health-strategy=custom

sudo pcs constraint location 'regexp%!health-.*' \
rule score-attribute='#health-azure' \
defined '#uname'

sudo crm_attribute --node prod-cl1-0 --name '#health-azure' --update 0
sudo crm_attribute --node prod-cl1-1 --name '#health-azure' --update 0

sudo pcs resource create health-azure-events \
ocf:heartbeat:azure-events-az \
op monitor interval=10s timeout=240s \
op start timeout=10s start-delay=90s

sudo pcs resource clone health-azure-events allow-unhealthy-nodes=true failure-timeout=120s
  1. Add additional check for pcmk_host_map to remove it if VM name is equal to hostname, or generate as per documentation:
    The 'pcmk_host_map' option is required in the command only if the hostnames and the Azure VM names are not identical. Specify the mapping in the format hostname:vm-name.

    https://github.com/sap-linuxlab/community.sap_install/blob/c1b479ef710f0f0803a5a081eafd621465c86d4b/roles/sap_ha_pacemaker_cluster/tasks/platform/include_vars_platform.yml#L75