SUSE Support

Here When You Need Us

SAPHanaSR-0.162.2: Registration Failure of Former Primary Post-Failover

This document (000021341) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server for SAP Applications 15 SP5
SUSE Linux Enterprise Server for SAP Applications 15 SP4
SUSE Linux Enterprise Server for SAP Applications 15 SP3
SUSE Linux Enterprise Server for SAP Applications 15 SP2
SUSE Linux Enterprise Server for SAP Applications 12 SP5

Situation

In a newly deployed SAP Hana Scale-Up cluster utilizing the SAPHanaSR-0.162.2 resource agent package with AUTOMATED_REGISTER=true, it has been noted that after a successful failover, the SAPHana resource agent's attempt to re-register the former primary instance fails due to the site name variable being empty. This issue consequently results in a startup failure for the SAPHana resource of the old primary:
hanat1 SAPHana(rsc_SAPHana_HA1_HDB00)[26036]: INFO: LPA: landscape: DOWN, LPA: register ==> try to register
hanat1 SAPHana(rsc_SAPHana_HA1_HDB00)[26036]: INFO: DEC: ANOTHER HANA IS AVAILABLE ==> LETS REGISTER
hanat1 SAPHana(rsc_SAPHana_HA1_HDB00)[26036]: INFO: ACT: REGISTER: hdbnsutil -sr_register --remoteHost=hanat2 --remoteInstance=00 --replicationMode=syncmem --operationMode=logreplay --name=
hanat1 SAPHana(rsc_SAPHana_HA1_HDB00)[26036]: ERROR: ACT: Register failed. Expected:'1' Actual: '0'
hanat1 pacemaker-execd[5044]:  notice: rsc_SAPHana_HA1_HDB00 start (call 133, PID 26036) exit 

Resolution

This issue has been resolved starting from SAPHanaSR-0.162.3 package version. If you encounter the problem, please update to the latest version of SAPHanaSR.

To safely update or downgrade the SAPHanaSR resource agent package (RA) while keeping both HANA and the pacemaker cluster online, refer to the steps from man page SAPHanaSR_maintenance_examples(7), outlined below in Additional Info section.

Cause

The bug in the new SAPHanaSR v0.162.2 arises because the 'site' variable is declared as local within the 'sht_init()' function, rather than globally. Consequently, this leads to a failure in a conditional check and prevents the set_hana_attribute() function from setting the 'hana_<sid>_site' attribute in the CIB. This problem impacts the automatic post-failover registration (when AUTOMATED_REGISTER=true), as the SAPHana resource depends on the 'hana_<sid>_site' attribute to determine the site name during registration. This affects mainly the newly deployed SAP Hana Scale-Up cluster using SAPHanaSR-0.162.2 with AUTOMATED_REGISTER=true.
SUSE versionAffected SAPHanaSR version
SLES 15 (SP1, SP2, SP3, SP4, SP5) for SAPSAPHanaSR-0.162.2-150000.4.34.1    
SLES 12 SP5 for SAPSAPHanaSR-0.162.2-3.32.2

Status

Reported to Engineering

Additional Information

SAPHanaSR Resource Package Update/Downgrade Procedure:

1. Set both SAPHana and SAPHanaTopology resources in maintenance mode:
hanat1:~ # crm resource maintenance rsc_SAPHana_HA1_HDB00
hanat1:~ # crm resource maintenance rsc_SAPHanaTopology_HA1_HDB00
2. Update or downgrade SAPHanaSR package.
hanat1:~ # zypper in SAPHanaSR-0.162.3
hanat2:~ # zypper in SAPHanaSR-0.162.3
3. Reload HANA HA/DR provider hook script on both sites.
hanat1:~ # su - ha1adm -c "hdbnsutil -reloadHADRProviders; echo rc=$?"
hanat2:~ # su - ha1adm -c "cdtrace; grep SAPHanaSR.init nameserver_*.trc"
4. Refresh SAPHana and SAPHanaTopology resources:
hanat1:~ # crm resource refresh rsc_SAPHanaTopology_HA1_HDB00
hanat1:~ # crm resource refresh rsc_SAPHana_HA1_HDB00
5. Bring both resources back to managed state:
hanat1:~ # crm resource maintenance rsc_SAPHanaTopology_HA1_HDB00 off
hanat1:~ # crm resource maintenance rsc_SAPHana_HA1_HDB00 off
6.  Remove the leftover resource maintenance meta attribute from CIB:
hanat1:~ # crm resource meta msl_SAPHana_HA1_HDB00 delete maintenance
hanat1:~ # crm resource meta cln_SAPHanaTopology_HA1_HDB00 delete maintenance
7. Check the status of Linux cluster and HANA:
hanat1:~ # cs_clusterstate -a
hanat1:~ # crm_mon -1r
hanat1:~ # crm configure show | grep cli-
hanat1:~ # SAPHanaSR-showAttr



Illustrating Correct Attribute Setting Example

The absence of the "hana_<sid>site" attribute can be identified using monitoring tools. For instance, when executing "# crm_mon -1Ar" the "hana<sid>_site" attribute may be missing. Similarly, using "# SAPHanaSR-showAttr" may reveal that the section containing HANA site names is absent:

hanat1:~ #SAPHanaSR-showAttr

Global cib-time                 maintenance 
--------------------------------------------
global Tue Jan 30 13:01:02 2024 false      

Resource                      maintenance 
------------------------------------------
cln_SAPHanaTopology_HA1_HDB00 false       
msl_SAPHana_HA1_HDB00         false      

Sites srHook 
-------------
SITE1 SOK    
SITE2 PRIM  

Hosts  clone_state lpa_ha1_lpt node_state op_mode   remoteHost roles                            score site  srah srmode standby sync_state version     vhost  
--------------------------------------------------------------------------------------------------------------------------------------------------------------
hanat1 DEMOTED     30          online     logreplay hanat2     4:S:master1:master:worker:master 100   SITE1 -    sync   off     SOK        2.00.073.00 hanat1 
hanat2 PROMOTED    1706616062  online     logreplay hanat1     4:P:master1:master:worker:master 150   SITE2 -    sync   off     PRIM       2.00.073.00 hanat2 
hanat1:~ #crm_mon -Ar -1

Node Attributes:
 * Node: hanat1:
   * hana_ha1_clone_state                : DEMOTED   
   * hana_ha1_op_mode                    : logreplay 
   * hana_ha1_remoteHost                 : hanat2    
   * hana_ha1_roles                      : 4:S:master1:master:worker:master
   * hana_ha1_site                       : SITE1     
   * hana_ha1_srah                       : -         
   * hana_ha1_srmode                     : sync      
   * hana_ha1_sync_state                 : SOK       
   * hana_ha1_version                    : 2.00.073.00
   * hana_ha1_vhost                      : hanat1    
   * lpa_ha1_lpt                         : 30        
   * master-rsc_SAPHana_HA1_HDB00        : 100       
 * Node: hanat2:
   * hana_ha1_clone_state                : PROMOTED  
   * hana_ha1_op_mode                    : logreplay 
   * hana_ha1_remoteHost                 : hanat1    
   * hana_ha1_roles                      : 4:P:master1:master:worker:master
   * hana_ha1_site                       : SITE2     
   * hana_ha1_srah                       : -         
   * hana_ha1_srmode                     : sync      
   * hana_ha1_sync_state                 : PRIM      
   * hana_ha1_version                    : 2.00.073.00
   * hana_ha1_vhost                      : hanat2    
   * lpa_ha1_lpt                         : 1706615997
   * master-rsc_SAPHana_HA1_HDB00        : 150    

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021341
  • Creation Date: 30-Jan-2024
  • Modified Date:05-Mar-2024
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.