Scroll to navigation

ocf_suse_SAPHanaTopology(7) OCF resource agents ocf_suse_SAPHanaTopology(7)

NAME

SAPHanaTopology - Helps to manage two SAP HANA databases with system replication.

SYNOPSIS

SAPHanaTopology [start | stop | status | monitor | meta-data | validate-all | reload | methods | usage ]

DESCRIPTION

SAPHanaTopology is a resource agent (RA) that analyzes the SAP HANA topology and "sends" all findings via cluster information base (CIB) attributes to all nodes in the cluster. These attributes are taken by the SAPHanaController RA to control the SAP HANA databases. In addition SAPHanaTopology starts and monitors the local saphostagent.

The resource agent uses the following interfaces provided by SAP:

1. landscapeHostConfiguration.py
landscapeHostConfiguration.py has some detailed output about HANA system status and node roles. For our monitor the overall status is relevant. This overall status is reported by the return code of the script: 0: Internal Fatal, 1: ERROR, 2: WARNING, 3: INFO (e.g. host auto-failover happened), 4: OK
The SAPHanaTopology resource agent will interpret return code 0 as FATAL, 1 as NOT-RUNNING (or ERROR) and return codes 2+3+4 as RUNNING. FATAL means the status can not be determined.
SAPHanaTopology scans the output of landscapeHostConfiguration.py to identify the roles of the cluster node. Roles means configured and current role of the nameserver as well as the indexserver.

2. hdbnsutil
The interface hdbnsutil is used to check the "topology" of the system replication as well as the current configuration (primary/secondary) of a SAP HANA database. A second task of the interface is the posibility to run a system replication takeover (sr_takeover) or to register a former primary to a newer one (sr_register). In scale-out setups, hdbnsutil sometimes might take some time. SAPHanaTopology uses only task one. SAPHanaController is using all three tasks.

3. saphostctrl
The interface saphostctrl uses the function ListInstances to figure out the virtual host name of the SAP HANA instance. This is typically the hostname used during the HANA installation.

Please notice that the method to "send" the findings via the node status attributes might change in a next version. So please do not think about those attributes as an "API". Also do not adjust those automatically set node attributes manulally in normal operation. Names and semantics of the attributes can change in next versions.

Please see also the REQUIREMENTS section below.

SUPPORTED PARAMETERS

This resource agent supports the following parameters:

SID

SAP System Identifier. Has to be same on both instances. Example "SID=SLE".

InstanceNumber

Number of the SAP HANA database. For system replication also Instance Number+1 is blocked. Example "InstanceNumber=00".

HANA_CALL_TIMEOUT

Define timeout how long a call to HANA to receive information can take. This could be e.g. landscapeHostConfiguration.py. There are some specific calls to HANA which have their own timeout values. For example the sr_takeover command does not timeout (inf). If the timeout is reached, the return code will be 124. If you increase the timeouts for HANA calls you should also adjust the operation timeouts of your Linux cluster resources.
Optional. Default value: 120

SUPPORTED PROPERTIES

hana_${sid}_glob_filter

Global cluster property hana_${sid}_glob_filter . This property defines which messages are logged by the RA. It should only be set if requested by support engineers. The default is sufficient for normal operation.
Message Types: [ act | dbg | dec | flow | top ]
ACT: Action. Start, stop, sr_takeover and others. See also section SUPPORTED ACTIONS.
DBG: Debugging info. Usually not needed at customer site. See SUSE TID 7022678 for maximum RA tracing.
DEC: Decision taken by the RA.
FLOW: Function calls and the respective return codes.
TOP: Topology. Messages related to HANA SR topology, like site name and remote site.
Optional, advanced. Default value: ra-act-dec-lpa.

SUPPORTED ACTIONS

This resource agent supports the following actions (operations):

start

Sets the status of the clone to "started".

stop

Sets the status of the clone to "stopped".

status

Reports whether the HANA instance is running. Suggested minimum timeout: 60.

monitor

Analyses the nodes HANA roles and landscape status. Suggested minimum timeout: 600. Suggested interval: 50.

validate-all

Reports whether the parameters are valid. Suggested minimum timeout: 5.

meta-data

Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5.

methods

Reports which methods (operations) the resource agent supports. Suggested minimum timeout: 5.

reload

Changes parameters without forcing a recover of the resource. Suggested minimum timeout: 5.

RETURN CODES

The return codes are defined by the OCF cluster framework. Please refer to the OCF definition on the website mentioned below.
In addition return code 124 is used if HANA_CALL_TIMEOUT has been exceeded.

EXAMPLES

* Example configuration of SAPHanaTopology resource for HANA scale-up.
In addition, a SAPHanaController resource is needed to make this work. The SAPHanaTopology monitoring intervall should be shorter than the one of that SAPHanaController.

primitive rsc_SAPHanaTop_SLE_HDB00 ocf:suse:SAPHanaTopology \
op start interval="0" timeout="600" \
op stop interval="0" timeout="600" \
op monitor interval="50" timeout="600" \
params SID="SLE" InstanceNumber="00"

clone cln_SAPHanaTop_SLE_HDB00 rsc_SAPHanaTop_SLE_HDB00 \
meta clone-node-max="1" interleave="true"

* Example configuration of SAPHanaTopology resource for HANA scale-out.
The HANA consists of two sites with five nodes each. An additional cluster node is used as majority maker for split brain situations. In addition, a SAPHanaController resource is needed to make this work. The SAPHanaTopology monitoring intervall should be shorter than the one of that SAPHanaController.

primitive rsc_SAPHanaTop_SLE_HDB00 ocf:suse:SAPHanaTopology \
op start interval="0" timeout="600" \
op stop interval="0" timeout="600" \
op monitor interval="50" timeout="600" \
params SID="SLE" InstanceNumber="00"

clone cln_SAPHanaTop_SLE_HDB00 rsc_SAPHanaTop_SLE_HDB00 \
meta clone-node-max="1" interleave="true"

location SAPHanaTop_not_on_majority_maker cln_SAPHanaTop_SLE_HDB00 -inf: vm-majority

order SAPHanaTop_first Optional: cln_SAPHanaTop_SLE_HDB00 mst_SAPHanaCon_SLE_HDB00

* Showing the current SAPHanaTopology resource configuration on scale-up.
The primitive is "rsc_SAPHanaTop_SLE_HDB00" and clone is "cln_SAPHanaTop_SLE_HDB00". The constraints´ names are starting with "SAPHanaTop".

# crm configure show | grep SAPHanaTop
# crm configure show rsc_SAPHanaTop_SLE_HDB00
# crm configure show cln_SAPHanaTop_SLE_HDB00
# crm configure show SAPHanaTop_first

* Correlating SAPHanaTopology syslog entry with HANA nameserver trace entry.

# grep "SAPHanaTop.*16933.*monitor_clone" /var/log/messages | awk '{print $1,$3,$7,$11,$12,$13}'
# su - hxeadm
~> cdtrace
~> grep "2023-11-01.*parent.*16933" nameserver_*trc | awk '{print $2,$3,$22,$23,$24,$25}'
~> exit

FILES

/usr/lib/ocf/resource.d/suse/SAPHanaController
the controller resource agent
/usr/lib/ocf/resource.d/suse/SAPHanaTopology
the topology resource agent
/usr/lib/ocf/resource.d/suse/SAPHanaFilesystem
the filesystem monitoring resource agent
/usr/lib/SAPHanaSR-angi/
directory with function libraries
$HA_RSCTMP/SAPHana/SAPTopologyON.$SID
the RA's status file (subject to change)
/usr/sap/$SID/$InstanceName/exe
default path for DIR_EXECUTABLE
/usr/sap/$SID/SYS/profile
default path for DIR_PROFILE

REQUIREMENTS

For the current version of the SAPHanaTopology resource agent that comes with the software package SAPHanaSR-angi, the support is limited to the scenarios and parameters described in the respective manual page SAPHanaSR-angi(7) and its references.

SEE ALSO

ocf_suse_SAPHanaController(7) , ocf_suse_SAPHanaFilesystem(7) , SAPHanaSR-showAttr(8) , crm(8), SAPHanaSR-angi(7) , SAPHanaSR(7) , SAPHanaSR-ScaleOut(7) ,
https://documentation.suse.com/sbp/sap/ ,
https://www.susecon.com/doc/2015/sessions/TUT19921.pdf ,
https://www.susecon.com/doc/2016/sessions/TUT90846.pdf ,
http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-ocf-return-codes.html ,
http://scn.sap.com/docs/DOC-60334
http://scn.sap.com/community/hana-in-memory/blog/2015/12/14/sap-hana-sps-11-whats-new-ha-and-dr--by-the-sap-hana-academy ,

AUTHORS

F.Herschel, L.Pinne.

COPYRIGHT

(c) 2014 SUSE Linux Products GmbH, Germany.
(c) 2015-2017 SUSE Linux GmbH, Germany.
(c) 2018-2024 SUSE LLC
SAPHanaTopology comes with ABSOLUTELY NO WARRANTY.
For details see the GNU General Public License at http://www.gnu.org/licenses/gpl.html

02 Jul 2024