Skip to content
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

Add support for HANA active/read-enabled system replication in Pacemaker cluster #660

Merged

Conversation

hjstam
Copy link
Contributor

@hjstam hjstam commented Nov 4, 2024

Problem

  • SAP allows active/read-enabled setups for SAP HANA System Replication, where the secondary systems of SAP HANA System Replication can be used actively for read-intense workloads. SDAF currently has no support for this.
  • The sapadm user isn't created with the sapadm_uid as specified in the ansible-input-api variable which was only observed on HANA systems. For (A)SCS, ERS and PAS/APP the generic user creation took care of the creation of the sapadm user with the right uid.

Solution

  • Add support for HANA active/read-enabled system replication in Pacemaker cluster. A second front-end is added to the HDB load balancer with a seperate health probe and load balancer rule. It re-uses the same back-end. HANA replication is set-up with the operation mode logreplay_readaccess and pacemaker is configured with an additional resource g_secip_.
  • Create the sapadm user like it was before version 3.7 of SDAF. This seems like a bug that was introduced in 5884945#diff-d3129e54dc1d8b4502da8ee28296a38f7b058bdff58ce55ecc9a8f72f3d10ddcR102

Tests

Deployed a high available HANA cluster on RHEL 8.10 with the database_active_active variable set to true.

[root@hana01] root # pcs status
Cluster name: SID_cluster
Cluster Summary:
  * Stack: corosync (Pacemaker is running)
  * Current DC: hana01 (version 2.1.7-5.2.el8_10-0f7f88312) - partition with quorum
  * Last updated: Mon Nov  4 17:08:03 2024 on hana02
  * Last change:  Mon Nov  4 16:21:58 2024 by root via root on hana02
  * 2 nodes configured
  * 9 resource instances configured

Node List:
  * Online: [ hana01 hana02 ]

Full List of Resources:
  * rsc_st_azure        (stonith:fence_azure_arm):       Started hana01
  * Clone Set: SAPHanaTopology_SID_00-clone [SAPHanaTopology_SID_00]:
    * Started: [ hana01 hana02 ]
  * Clone Set: SAPHana_SID_00-clone [SAPHana_SID_00] (promotable):
    * Masters: [ hana02 ]
    * Slaves: [ hana01 ]
  * Resource Group: g_ip_SID_00:
    * nc_SID_00 (ocf::heartbeat:azure-lb):       Started hana02
    * vip_SID_00        (ocf::heartbeat:IPaddr2):        Started hana02	
  * Resource Group: g_secip_SID_00 :
    * secnc_SID_00      (ocf::heartbeat:azure-lb):       Started hana01
    * secvip_SID_00     (ocf::heartbeat:IPaddr2):        Started hana01

Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled
sidadm@hana01:/usr/sap/sid/HDB00> hdbnsutil -sr_state | grep "operation mode"
operation mode: logreplay_readaccess
Performing Final Memory Release with 9 threads.
Finished Final Memory Release successfuly.

Notes

https://learn.microsoft.com/en-us/azure/sap/workloads/sap-hana-high-availability-rhel?tabs=lb-portal#configure-hana-activeread-enabled-system-replication-in-pacemaker-cluster
https://learn.microsoft.com/en-us/azure/sap/workloads/sap-hana-high-availability?tabs=lb-portal%2Csaphanasr#configure-hana-activeread-enabled-system-replication-in-a-pacemaker-cluster

@hjstam hjstam requested a review from a team as a code owner November 4, 2024 16:11
@hjstam hjstam requested review from dhruvmicrosoft and removed request for a team November 4, 2024 16:11
@devanshjainms devanshjainms requested review from hdamecharla and removed request for dhruvmicrosoft November 4, 2024 16:15
sapadm user wasn't created anymore by SDAF. Updated the when statement and aligned user properties with sapinst.

Shell: /bin/false
Description: SAP System Administrator
@hjstam hjstam force-pushed the patch/add-hana-active-active-support branch from f2d656f to 3a53a3c Compare November 4, 2024 16:23
Copy link
Member

@hdamecharla hdamecharla left a comment

Choose a reason for hiding this comment

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

Approved #660

@hdamecharla hdamecharla merged commit 2da6303 into Azure:development Nov 5, 2024
2 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