azure-sap-zone: new resource agent for Azure SAP zone alignment#2122
azure-sap-zone: new resource agent for Azure SAP zone alignment#2122oalbrigt merged 4 commits intoClusterLabs:mainfrom
Conversation
|
Can one of the project admins check and authorise this run please: https://ci.kronosnet.org/job/resource-agents/job/resource-agents-pipeline/job/PR-2122/1/input |
|
Hi @oalbrigt I noticed the PR was moved to draft a few days ago. I didn’t see any comments, so I just wanted to check if there’s anything specific, you’d like me to address or if more work is needed before review. Happy to make updates. Thanks! |
|
We are discussing where it would make most sense to host this. If it would be with the SAP agents, or in this repo. I'll come back to you when we have made a decission. |
|
@oalbrigt Hello, please let me know if there are any updates from your discussion. |
|
@oalbrigt Hello, following up on this. Let me know if there are any updates from your discussion. |
|
I'm still waiting for an update from our internal discussion, and have asked for an update again. |
|
@oalbrigt Hello, let me know if there are any updates from your discussion. |
|
@sanoop-t We've decided to merge it here. So I'll do a full review next week. From a quick glance you have to add it to the See https://github.com/ClusterLabs/resource-agents/blob/main/doc/dev-guides/ra-dev-guide.asc#submitting-resource-agents for more info. |
|
Can one of the project admins check and authorise this run please: https://haci.fast.eng.rdu2.dc.redhat.com/job/resource-agents/job/resource-agents-pipeline/job/PR-2122/2/input |
Add azure-sap-zone to configure.ac, heartbeat/Makefile.am, doc/man/Makefile.am, and .gitignore following the existing azure-events pattern. The agent is conditionally built when Python 3.6+ is available.
2cfa0e7 to
1060cc6
Compare
|
Can one of the project admins check and authorise this run please: https://haci.fast.eng.rdu2.dc.redhat.com/job/resource-agents/job/resource-agents-pipeline/job/PR-2122/3/input |
|
Thanks @oalbrigt! I've updated the PR with the build system integration:
All following the existing azure-events pattern. Ready for your full review whenever you get a chance. |
|
Great. Thanks. |
Remove the _OCFShim fallback class and custom OCF path-searching logic. Use the standard ocf.py import pattern consistent with other Python agents in the repository. Remove the custom _is_probe_operation() function in favor of ocf.is_probe(). Adjust validate_action to handle string parameter values from the ocf.py run loop.
|
Can one of the project admins check and authorise this run please: https://haci.fast.eng.rdu2.dc.redhat.com/job/resource-agents/job/resource-agents-pipeline/job/PR-2122/4/input |
oalbrigt
left a comment
There was a problem hiding this comment.
Looks good in general.
Just a bashism that's nice to get rid of.
Replace [[ ... == *OK* ]] pattern match with a POSIX-compatible case/esac construct for better portability across sh implementations.
|
Can one of the project admins check and authorise this run please: https://haci.fast.eng.rdu2.dc.redhat.com/job/resource-agents/job/resource-agents-pipeline/job/PR-2122/5/input |
|
Thanks. |
PR Summary
This PR adds a new Python-based OCF resource agent under
heartbeat/namedazure-sap-zone. The agent helps align SAP application-server activity with the active (PROMOTED) HANA node’s Azure Availability Zone (or a logical “zone group” for non-zonal/PPG deployments), to reduce cross-zone latency and to automate app-tier switching during HANA failover.Key behavior
hana_vm_zonesmapping (non-zonal/PPG deployments).stop_vms=false: deactivates SAP (passive mode) without stopping VMs.stop_vms=true: stops SAP, waits for shutdown, then deallocates those VMs.Notable parameters
hana_resource(required): Pacemaker HANA resource name used to read status attributes.app_vm_names(comma-separated), orapp_vm_name_pattern(regex), orapp_vm_zones(mapping; can also supply names).hana_vm_zones="hanavm1:1,hanavm2:2"app_vm_zones="sapapp01:1,sapapp02:1,sapapp03:2,..."client_id(optional): user-assigned MI; if omitted, system-assigned MI is used.stop_vms,wait_before_stop_sap,wait_time,soft_shutdown_timeoutretry_count,retry_waitfor ARM API retriesSafety/correctness notes
app_vm_zones/hana_vm_zonesare provided and Azure zone metadata exists, the agent verifies the mapping matches Azure and fails early on mismatch.PowerState/*) from instanceView.Dependencies / packaging
requestsis treated as an optional import someta-datadiscovery can still work; Azure API operations requirepython3-requests.Testing / validation performed
meta-dataoutput generation andvalidate-allparameter validation paths.Notes
#!@PYTHON@ -tt(consistent with other Python agents that are patched/installed by packaging or install instructions).