OCF_HEARTBEAT_AZURE-SAP-ZONE(7)
π ocf_heartbeat_azure-sap-zone β the Microsoft SAP Azure Zone Sync agent for SAP systems π
okay so bestie, this page lives in the OCF_HEARTBEAT_AZURE manual family β welcome to it, you're gonna love it here. π«Ά
β¨ NAME β¨
ocf_heartbeat_azure-sap-zone β the Microsoft SAP Azure Zone Sync agent for SAP systems, and honestly? it's giving "quietly keeping your whole cluster from falling apart." π
π¦ SYNOPSIS π¦
azure-sap-zone [start | stop | monitor | meta-data | validate-all]
πΈ DESCRIPTION πΈ
So this resource agent implements a monitor that aligns your SAP application servers into the same Availability zone as the HANA database server β literally so you don't get cooked by network latency issues. no cap. π₯
Application VM selection: you gotta provide at least one of these three besties: app_vm_names, app_vm_name_pattern, or app_vm_zones. And if app_vm_zones is provided but app_vm_names / app_vm_name_pattern are not, then the agent uses the VM names from app_vm_zones as the effective application VM list. iykyk. β¨
Pre-requisites (read these, fr fr):
- Either a user-assigned or system-assigned managed identity should be configured on both the SAP HANA VMs and the SAP application server VMs.
- That managed identity should have VM contributor access on the SAP application server VMs.
- The SAP HANA VMs should have outbound access to call Azure API endpoints.
Azure cloud environments: by default the agent detects the Azure environment from instance metadata and uses the corresponding Azure Resource Manager endpoint. The supported environments are AzureChinaCloud, AzurePublicCloud, AzureUSGovernmentCloud. Use azure_environment to override the detected environment, or azure_management_endpoint to hand it a custom Azure Resource Manager endpoint for other sovereign clouds. π
Example deployment for SLES: create the resource with the required parameters (using system-assigned managed identity) β
sudo crm configure primitive azure-sap-zone azure-sap-zone meta failure-timeout=120s params sid=ML4 verbose=true app_vm_name_pattern=ml4app soft_shutdown_timeout=300 wait_time=600 stop_vms=false op start start-delay=60s interval=0s timeout=360s op monitor interval=10s timeout=360s op stop timeout=10s interval=0s
Non-zonal/PPG example (logical grouping; app VMs sourced from app_vm_zones) β
sudo crm configure primitive azure-sap-zone azure-sap-zone meta failure-timeout=120s params sid=ML4 verbose=true hana_vm_zones="hanavm1:1,hanavm2:2" app_vm_zones="sapapp01:1,sapapp02:1,sapapp03:2,sapapp04:2" soft_shutdown_timeout=300 wait_time=600 stop_vms=false op start start-delay=60s interval=0s timeout=360s op monitor interval=10s timeout=360s op stop timeout=10s interval=0s
Then create a clone resource so that the resource runs on both nodes:
crm configure clone cln_azure-sap-zone azure-sap-zone meta clone-node-max=1 target-role=Started interleave=true
Troubleshooting: set the verbose parameter to true, then go check the pacemaker.log file:
grep -i 'azure-sap-zone' /var/log/pacemaker/pacemaker.log
grep -iE 'azure-sap-zone.*(INFO|WARNING|ERROR):' /var/log/pacemaker/pacemaker.log | grep -v -iE "All phases|monitor: Started"
π SUPPORTED PARAMETERS π
sidβ sets the SAP SID name. (optional, string, no default)hana_sidβ sets the HANA SID name. you can leave this one blank if the SID is the same as the HANA SID, easy. (optional, string, no default)hana_resourceβ sets the HANA resource name that's used in the pacemaker cluster. (optional, string, no default)hana_vm_zonesβ optional mapping of HANA VM name β a logical zone group label. use this for the non-zonal/PPG scenarios where Azure zone metadata just isn't available. format:'hanavm1:1,hanavm2:2'. and heads up π β if Azure VM zone metadata does exist for those VMs, the agent will verify it matches this mapping on every start and fail if it doesn't. (optional, string, no default)verboseβ set totrueto enable verbose logging. your future self debugging at 2am says thank you. (optional, boolean, defaultfalse)soft_shutdown_timeoutβ sets the time in seconds. (optional, integer, default600)app_vm_namesβ a comma-separated list of SAP application server VM names. if set, only the VMs in this list get included in zone alignment. optional whenapp_vm_zonesis provided. (optional, string, no default)app_vm_name_patternβ a regex pattern used to discover SAP application server VM names. if bothapp_vm_namesandapp_vm_name_patternare provided, thenapp_vm_nameswins (it's the main character π ). optional whenapp_vm_zonesis provided. (optional, string, no default)app_vm_zonesβ optional mapping of SAP application server VM name β a logical zone group label. use this for non-zonal/PPG scenarios where Azure zone metadata isn't available. format:'vm1:1,vm2:1,vm3:2'. you can provide this mapping for all app VMs, or only for a subset (like, say, just the VMs with no Azure zone metadata β we love a partial). ifapp_vm_namesandapp_vm_name_patternare not provided, the VM names from this mapping become the effective application VM list. and same deal as before: if Azure VM zone metadata exists for the mapped VMs, the agent verifies it matches this mapping on every start and fails if it doesn't. (optional, string, no default)resource_groupβ you can leave this blank if the SAP application server VMs live in the same resource group as the HANA VMs. β¨ (optional, string, no default)client_idβ the client ID of the user-assigned managed identity. if it's not provided, system-assigned managed identity gets used instead. that managed identity should be assigned to both SAP HANA VMs and should have VM contributor access on the SAP application server VMs provided in theapp_vm_namesparameter. π (optional, string, no default)azure_environmentβ optional Azure cloud environment override. if unset, the agent detects the environment from Azure instance metadata. supported values:AzureChinaCloud,AzurePublicCloud,AzureUSGovernmentCloud. for other sovereign clouds, setazure_management_endpointinstead. π (optional, string, no default)azure_management_endpointβ optional Azure Resource Manager endpoint override for custom or future sovereign clouds. if set, this endpoint takes precedence overazure_environmentand over Azure instance metadata β and it's also used as the managed identity token resource/audience. example:https://management.usgovcloudapi.net(optional, string, no default)wait_before_stop_sapβ wait time in seconds before stopping SAP instances on VMs in a different zone. this exists so you don't get SAP instance restarts if there's another failover. π (optional, integer, default300)wait_timeβ wait time in seconds for phases to complete. if this wait time gets exceeded, then the resource agent will fail. π (optional, integer, default600)stop_vmsβ if set toTrue, the resource agent soft shutdowns the SAP instances and stops the VMs in a different zone. if set toFalse, the resource agent sets the instances in passive mode and does not stop the VMs in the different zone. two whole vibes, pick one. (optional, boolean, defaultfalse)retry_countβ set to any number greater than zero to enable retry count. (optional, integer, default3)retry_waitβ sets the retry wait time in seconds. (optional, integer, default20)
π SUPPORTED ACTIONS π
this resource agent supports the following actions (operations), bestie:
startβ starts the resource. suggested minimum timeout:10s.stopβ stops the resource. suggested minimum timeout:10s.validate-allβ performs a validation of the resource configuration. suggested minimum timeout:20s.monitorβ performs a detailed status check. suggested minimum timeout:360s. suggested interval:300s.meta-dataβ retrieves resource agent metadata (internal use only). suggested minimum timeout:10s.
π§ EXAMPLE CRM SHELL π§
here's an example configuration for an azure-sap-zone resource using the crm(8) shell:
primitive p_azure-sap-zone ocf:heartbeat:azure-sap-zone \
op monitor timeout="360s" interval="300s"
β EXAMPLE PCS β
and here's an example configuration for an azure-sap-zone resource using pcs(8):
pcs resource create p_azure-sap-zone ocf:heartbeat:azure-sap-zone \
op monitor timeout="360s" interval="300s"
π SEE ALSO π
http://clusterlabs.org/β go look, it's iconic.
π AUTHOR π
ClusterLabs contributors (see the resource agent source for info about individual authors). love them, genuinely. π«Ά
and that's the whole page, babes β this one came to you straight out of the OCF_HEARTBEAT_AZURE manual set (footer's just OCF_HEARTBEAT_AZURE(), no version or date stamped on it β the page keeps it mysterious like that π). go forth and align those zones. β¨π
π¦ where this page comes from
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms