1OCF_HEARTBEAT_SAPHAN(7)       OCF resource agents      OCF_HEARTBEAT_SAPHAN(7)
2
3
4

NAME

6       ocf_heartbeat_SAPHana - Manages two SAP HANA database systems in system
7       replication (SR).
8

SYNOPSIS

10       SAPHana [start | stop | status | monitor | promote | demote | meta-data
11               | validate-all]
12

DESCRIPTION

14       The SAPHanaSR resource agent manages two SAP HANA database systems
15       which are configured in system replication. SAPHana supports Scale-Up
16       scenarios.
17
18       Managing the two SAP HANA database systems means that the resource
19       agent controls the start/stop of the instances. In addition the
20       resource agent is able to monitor the SAP HANA databases to check their
21       availability on landscape host configuration level. For this monitoring
22       the resource agent relies on interfaces provided by SAP. A third task
23       of the resource agent is to also check the synchronisation status of
24       the two SAP HANA databases. If the synchronisation is not "SOK", then
25       the cluster avoids to failover to the secondary side, if the primary
26       fails. This is to improve the data consistency.
27
28       The resource agent uses the following four interfaces provided by SAP:
29
30       1. sapcontrol/sapstartsrv The interface sapcontrol/sapstartsrv is used
31       to start/stop a HANA database instance/system
32
33       2. landscapeHostConfiguration The interface is used to monitor a HANA
34       system. The python script is named landscapeHostConfiguration.py.
35       landscapeHostConfiguration.py has some detailed output about HANA
36       system status and node roles. For our monitor the overall status is
37       relevant. This overall status is reported by the returncode of the
38       script: 0: Internal Fatal, 1: ERROR, 2: WARNING, 3: INFO, 4: OK The
39       SAPHana resource agent will interpret returncodes 0 as FATAL, 1 as
40       not-running or ERROR and and returncodes 2+3+4 as RUNNING.
41
42       3. hdbnsutil The interface hdbnsutil is used to check the "topology" of
43       the system replication as well as the current configuration
44       (primary/secondary) of a SAP HANA database instance. A second task of
45       the interface is the possibility to run a system replication takeover
46       (sr_takeover) or to register a former primary to a newer one
47       (sr_register).
48
49       4. hdbsql / systemReplicationStatus Interface is SQL query into HANA
50       (system replication table). The hdbsql query will be replaced by a
51       python script "systemReplicationStatus.py" in SAP HANA SPS8 or 9. As
52       long as we need to use hdbsql you need to setup secure store users for
53       linux user root to be able to access the SAP HANA database. You need to
54       configure a secure store user key "SAPHANASR" which can connect the SAP
55       HANA database:
56
57       5. saphostctrl The interface saphostctrl uses the function
58       ListInstances to figure out the virtual host name of the SAP HANA
59       instance. This is the hostname used during the HANA installation.
60

SUPPORTED PARAMETERS

62       SID
63           SAP System Identifier (SID) like "SLE" or "HAE"
64
65           (required, string, no default)
66
67       InstanceNumber
68           SAP instance number like "00" or "07"
69
70           (required, string, no default)
71
72       PREFER_SITE_TAKEOVER
73           Should cluster/RA prefer to switchover to slave instance instead of
74           restarting master locally? Default="yes" no: Do prefer restart
75           locally yes: Do prefer takever to remote site never: Do never run a
76           sr_takeover (promote) at the secondary side. THIS VALUE IS
77           CURRENTLY NOT SUPPORTED.
78
79           (optional, string, default "yes")
80
81       AUTOMATED_REGISTER
82           The parameter AUTOMATED_REGISTER defines, whether a former primary
83           instance should be registered automatically by the resource agent
84           during cluster/resource start, if the DUPLICATE_PRIMARY_TIMEOUT is
85           expired... TDB
86
87           (optional, boolean, default false)
88
89       DUPLICATE_PRIMARY_TIMEOUT
90           Time difference needed between to primary time stamps, if a
91           dual-primary situation occurs. If the time difference is less than
92           the time gap, then the cluster holds one or both instances in a
93           "WAITING" status. This is to give an admin a chance to react on a
94           failover. A failed former primary will be registered after the time
95           difference is passed. After this registration to the new primary
96           all data will be overwritten by the system replication.
97
98           (optional, string, default "7200")
99
100       DIR_EXECUTABLE
101           The full qualified path where to find sapstartsrv and sapcontrol.
102           Specify this parameter, if you have changed the SAP kernel
103           directory location after the default SAP installation.
104
105           (optional, string, no default)
106
107       DIR_PROFILE
108           The full qualified path where to find the SAP START profile.
109           Specify this parameter, if you have changed the SAP profile
110           directory location after the default SAP installation.
111
112           (optional, string, no default)
113
114       INSTANCE_PROFILE
115           The name of the SAP HANA instance profile. Specify this parameter,
116           if you have changed the name of the SAP HANA instance profile after
117           the default SAP installation. Normally you do not need to set this
118           parameter.
119
120           (unique, optional, string, no default)
121
122       SAPHanaFilter
123           OUTDATED PARAMETER
124
125           (optional, string, no default)
126

SUPPORTED ACTIONS

128       This resource agent supports the following actions (operations):
129
130       start
131           Starts the resource. Suggested minimum timeout: 180.
132
133       stop
134           Stops the resource. Suggested minimum timeout: 240.
135
136       status
137           Performs a status check. Suggested minimum timeout: 60.
138
139       monitor
140           Performs a detailed status check. Suggested minimum timeout: 60.
141           Suggested interval: 120.
142
143       monitor (Slave role)
144           Performs a detailed status check. Suggested minimum timeout: 60.
145           Suggested interval: 121.
146
147       monitor (Master role)
148           Performs a detailed status check. Suggested minimum timeout: 60.
149           Suggested interval: 119.
150
151       promote
152           Promotes the resource to the Master role. Suggested minimum
153           timeout: 320.
154
155       demote
156           Demotes the resource to the Slave role. Suggested minimum timeout:
157           320.
158
159       validate-all
160           Performs a validation of the resource configuration. Suggested
161           minimum timeout: 5.
162
163       meta-data
164           Retrieves resource agent metadata (internal use only). Suggested
165           minimum timeout: 5.
166
167       methods
168           Suggested minimum timeout: 5.
169

EXAMPLE

171       The following is an example configuration for a SAPHana resource using
172       the crm(8) shell:
173
174           primitive p_SAPHana ocf:heartbeat:SAPHana \
175             params \
176               SID=string \
177               InstanceNumber=string \
178             op monitor depth="0" timeout="60" interval="120" \
179             op monitor depth="0" timeout="60" interval="121" role="Slave" \
180             op monitor depth="0" timeout="60" interval="119" role="Master"
181
182           ms ms_SAPHana p_SAPHana \
183             meta notify="true" interleave="true"
184

SEE ALSO

186       http://www.linux-ha.org/wiki/SAPHana_(resource_agent)
187

AUTHOR

189       Linux-HA contributors (see the resource agent source for information
190       about individual authors)
191
192
193
194resource-agents 3.9.2             03/24/2017           OCF_HEARTBEAT_SAPHAN(7)
Impressum