table of contents
OCF_HEARTBEAT_SAPHAN(7) | OCF resource agents | OCF_HEARTBEAT_SAPHAN(7) |
NAME¶
ocf_heartbeat_SAPHanaController - Manages two SAP HANA database systems in system replication (SR).
SYNOPSIS¶
SAPHanaController [start | stop | status | monitor | promote | demote | meta-data | validate-all]
DESCRIPTION¶
The SAPHanaSR resource agent manages two SAP HANA database systems which are configured in system replication. SAPHanaController supports Scale-Out scenarios.
Managing the two SAP HANA database systems means that the resource agent controls the start/stop of the instances. In addition the resource agent is able to monitor the SAP HANA databases to check their availability on landscape host configuration level. For this monitoring the resource agent relies on interfaces provided by SAP. A third task of the resource agent is to also check the synchronisation status of the two SAP HANA databases. If the synchronisation is not "SOK", then the cluster avoids to failover to the secondary side, if the primary fails. This is to improve the data consistency.
The resource agent uses the following four interfaces provided by SAP:
1. sapcontrol/sapstartsrv The interface sapcontrol/sapstartsrv is used to start/stop a HANA database instance/system
2. landscapeHostConfiguration The interface is used to monitor a HANA system. The python script is named 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 returncode of the script: 0: Internal Fatal, 1: ERROR, 2: WARNING, 3: INFO, 4: OK The SAPHanaController resource agent will interpret returncodes 0 as FATAL, 1 as not-running or ERROR and and returncodes 2+3+4 as RUNNING.
3. 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 instance. A second task of the interface is the possibility to run a system replication takeover (sr_takeover) or to register a former primary to a newer one (sr_register).
4. hdbsql / systemReplicationStatus Interface is SQL query into HANA (system replication table). The hdbsql query will be replaced by a python script "systemReplicationStatus.py" in SAP HANA SPS8 or 9. As long as we need to use hdbsql you need to setup secure store users for linux user root to be able to access the SAP HANA database. You need to configure a secure store user key "SAPHANASR" which can connect the SAP HANA database:
5. saphostctrl The interface saphostctrl uses the function ListInstances to figure out the virtual host name of the SAP HANA instance. This is the hostname used during the HANA installation.
SUPPORTED PARAMETERS¶
SID
(required, string, no default)
InstanceNumber
(required, string, no default)
PREFER_SITE_TAKEOVER
(optional, string, default "yes")
AUTOMATED_REGISTER
(optional, boolean, default false)
DUPLICATE_PRIMARY_TIMEOUT
(optional, string, default "7200")
HANA_CALL_TIMEOUT
(optional, string, default "120")
DIR_EXECUTABLE
(optional, string, no default)
DIR_PROFILE
(optional, string, no default)
INSTANCE_PROFILE
(unique, optional, string, no default)
SUPPORTED ACTIONS¶
This resource agent supports the following actions (operations):
start
stop
status
monitor
monitor (Slave role)
monitor (Master role)
promote
demote
validate-all
meta-data
methods
EXAMPLE CRM SHELL¶
The following is an example configuration for a SAPHanaController resource using the crm(8) shell:
primitive p_SAPHanaController ocf:heartbeat:SAPHanaController \
params \
SID=string \
InstanceNumber=string \
op monitor depth="0" timeout="60" interval="120" \
op monitor depth="0" timeout="60" interval="121" role="Slave" \
op monitor depth="0" timeout="60" interval="119" role="Master"
ms ms_SAPHanaController p_SAPHanaController \
meta notify="true" interleave="true"
EXAMPLE PCS¶
The following is an example configuration for a SAPHanaController resource using pcs(8)
pcs resource create p_SAPHanaController ocf:heartbeat:SAPHanaController \
SID=string \
InstanceNumber=string \
op monitor depth="0" timeout="60" interval="120" \
op monitor depth="0" timeout="60" interval="121" role="Slave" \
op monitor depth="0" timeout="60" interval="119" role="Master" --master
SEE ALSO¶
AUTHOR¶
ClusterLabs contributors (see the resource agent source for information about individual authors)
08/08/2019 | resource-agents UNKNOWN |