How can the srConnectionChanged() hook be used to improve the detection of situations where a takeover is required, in a Red Hat Pacemaker cluster managing HANA Scale-up or Scale-out System Replication?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 7 or 8 (with the High Availability Add-on)
  • SAP HANA Scale-up or Scale-out Pacemaker cluster

Issue

  • Is the srConnectionChanged() hook supported with the Red Hat High Availability solution for SAP HANA Scale-up or Scale-out System Replication?
  • How do I integrate the srConnectionChanged() hook provided by SAP HANA into a Pacemaker cluster managing HANA System Replication?
  • When is the srConnectionChanged() hook called in a Pacemaker cluster managing HANA Scale-up/Scale-out System Replication, and what does it do?

Resolution

According to the Content from help.sap.com is not included.SAP HANA Administration Guide, the srConnectionChanged() method of the SAPHanaSR hook is called "as soon as one of the replicating services loses or (re-)establishes the system replication connection." It is called only once, on the master node on the primary site.

It uses the current system replication status to modify the Pacemaker node attributes that indicate sync state. The SAPHana resource agent can then use the updated values to make promotion/demotion decisions.

To use the srConnectionChanged() hook, the SAPHana and SAPHanaTopology resource agents provided by the following versions of the resource-agents-sap-hana package are required:

For instructions, refer to the Enable the SAP HANA HA/DR Provider Hook section of the Automated SAP HANA System Replication in Scale-Up in pacemaker cluster guide.


The package versions listed above that support the srConnectionChanged() hook also contain the following improvements:

  • Improved handling of timeout conditions when running various HANA tools to determine the status of the HANA environment during monitor operations
  • Fixes for issues with detection of the current state of the HANA instance when the cluster is started again after a complete shutdown of all cluster nodes
  • Improved management of the sapstartsrv process for the HANA instances
  • Changes to the default values for resource operation timeouts to match the recommendations given in the documentation describing the setup of the HA solution from Red Hat and others (e.g., Automated SAP HANA System Replication in Scale-Up in pacemaker cluster)
  • Corrections to the information about the default value for the PREFER_SITE_TAKEOVER attribute
  • Corrections of various spelling errors in log messages
SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.