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

NAME

6       ocf_heartbeat_SAPInstance - Manages a SAP instance as an HA resource.
7

SYNOPSIS

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

DESCRIPTION

13       Usually a SAP system consists of one database and at least one or more
14       SAP instances (sometimes called application servers). One SAP Instance
15       is defined by having exactly one instance profile. The instance
16       profiles can usually be found in the directory /sapmnt/SID/profile.
17       Each instance must be configured as it's own resource in the cluster
18       configuration. The resource agent supports the following SAP versions:
19
20       - SAP WebAS ABAP Release 6.20 - 7.40
21
22       - SAP WebAS Java Release 6.40 - 7.40
23
24       - SAP WebAS ABAP + Java Add-In Release 6.20 - 7.40 (Java is not
25       monitored by the cluster in that case) When using a SAP Kernel 6.40
26       please check and implement the actions from the section "Manual
27       postprocessing" from SAP note 995116 (http://sdn.sap.com). Other
28       versions may also work with this agent, but have not been verified.
29
30       All operations of the SAPInstance resource agent are done by using the
31       startup framework called SAP Management Console or sapstartsrv that was
32       introduced with SAP kernel release 6.40. Find more information about
33       the SAP Management Console in SAP note 1014480. Using this framework
34       defines a clear interface for the Heartbeat cluster, how it sees the
35       SAP system. The options for monitoring the SAP system are also much
36       better than other methods like just watching the ps command for running
37       processes or doing some pings to the application. sapstartsrv uses SOAP
38       messages to request the status of running SAP processes. Therefore it
39       can actually ask a process itself what it's status is, independent from
40       other problems that might exist at the same time.
41
42       sapstartsrv knows 4 status colours:
43
44       - GREEN = everything is fine
45
46       - YELLOW = something is wrong, but the service is still working
47
48       - RED = the service does not work
49
50       - GRAY = the service has not been started
51
52       The SAPInstance resource agent will interpret GREEN and YELLOW as OK.
53       That means that minor problems will not be reported to the Heartbeat
54       cluster. This prevents the cluster from doing an unwanted failover. The
55       statuses RED and GRAY are reported as NOT_RUNNING to the cluster.
56       Depending on the status the cluster expects from the resource, it will
57       do a restart, failover or just nothing.
58

SUPPORTED PARAMETERS

60       InstanceName
61           The full qualified SAP instance name. e.g. P01_DVEBMGS00_sapp01ci.
62           Usually this is the name of the SAP instance profile.
63
64           (unique, required, string, no default)
65
66       DIR_EXECUTABLE
67           The full qualified path where to find sapstartsrv and sapcontrol.
68           Specify this parameter, if you have changed the SAP kernel
69           directory location after the default SAP installation.
70
71           (optional, string, no default)
72
73       DIR_PROFILE
74           The full qualified path where to find the SAP START profile.
75           Specify this parameter, if you have changed the SAP profile
76           directory location after the default SAP installation.
77
78           (optional, string, no default)
79
80       START_PROFILE
81           The name of the SAP START profile. Specify this parameter, if you
82           have changed the name of the SAP START profile after the default
83           SAP installation. As SAP release 7.10 does not have a START profile
84           anymore, you need to specify the Instance Profile than.
85
86           (unique, optional, string, no default)
87
88       START_WAITTIME
89           After that time in seconds a monitor operation is executed by the
90           resource agent. Does the monitor return SUCCESS, the start
91           ishandled as SUCCESS. This is useful to resolve timing problems
92           with e.g. the J2EE-Addin instance.Usually the resource agent waits
93           until all services are started and the SAP Management Console
94           reports a GREEN status. A double stack installation (ABAP + Java
95           AddIn) consists of an ABAP dispatcher and a JAVA instance. Normally
96           the start of the JAVA instance takes much longer than the start of
97           the ABAP instance. For a JAVA Instance you may need to configure a
98           much higher timeout for the start operation of the resource in
99           Heartbeat. The disadvantage here is, that the discovery of a failed
100           start by the cluster takes longer. Somebody might say: For me it is
101           important, that the ABAP instance is up and running. A failure of
102           the JAVA instance shall not cause a failover of the SAP instance.
103           Actually the SAP MC reports a YELLOW status, if the JAVA instance
104           of a double stack system fails. From the resource agent point of
105           view YELLOW means:everything is OK. Setting START_WAITTIME to a
106           lower value determines the resource agent to check the status of
107           the instance during a start operation after that time. As it would
108           wait normally for a GREEN status, now it reports SUCCESS to the
109           cluster in case of a YELLOW status already after the specified
110           time.
111
112           That is only useful for double stack systems.
113
114           (optional, string, default "3600")
115
116       AUTOMATIC_RECOVER
117           The SAPInstance resource agent tries to recover a failed start
118           attempt automatically one time. This is done by killing running
119           instance processes, removing the kill.sap file and executing
120           cleanipc. Sometimes a crashed SAP instance leaves some processes
121           and/or shared memory segments behind. Setting this option to true
122           will try to remove those leftovers during a start operation. That
123           is to reduce manual work for the administrator.
124
125           (optional, boolean, default false)
126
127       MONITOR_SERVICES
128           Within a SAP instance there can be several services. Usually you
129           will find the defined services in the START profile of the related
130           instance (Attention: with SAP Release 7.10 the START profile
131           content was moved to the instance profile). Not all of those
132           services are worth to monitor by the cluster. For example you
133           properly do not like to failover your SAP instance, if the central
134           syslog collector daemon fails. Those services are monitored within
135           the SAPInstance resource agent:
136
137           - disp+work
138
139           - msg_server
140
141           - enserver (ENSA1)
142
143           - enq_server (ENSA2)
144
145           - enrepserver (ENSA1)
146
147           - enq_replicator (ENSA2)
148
149           - jcontrol
150
151           - jstart
152
153           Some other services could be monitored as well. They have to be
154           given with the parameter MONITOR_SERVICES, e.g.:
155
156           - sapwebdisp - TREXDaemon.x
157
158           That names match the strings used in the output of the command
159           'sapcontrol -nr [Instance-Nr] -function GetProcessList'. The
160           default should fit most cases where you want to manage a SAP
161           Instance from the cluster. You may change this with this parameter,
162           if you like to monitor more/less or other services that sapstartsrv
163           supports. You may specify multiple services separated by a | (pipe)
164           sign in this parameter: disp+work|msg_server|enserver
165
166           (optional, string, default
167           "disp+work|msg_server|enserver|enrepserver|jcontrol|jstart|enq_server|enq_replicator")
168
169       SHUTDOWN_METHOD
170           Usually a SAP Instance is stopped by the command 'sapcontrol -nr
171           InstanceNr -function Stop'. SHUTDOWN_METHOD=KILL means to kill the
172           SAP Instance using OS commands. SAP processes of the instance are
173           terminated with 'kill -9', shared memory is deleted with 'cleanipc'
174           and the 'kill.sap' file will be deleted. That method is much faster
175           than the graceful stop, but the instance does not have the chance
176           to say goodbye to other SAPinstances in the same system. USE AT
177           YOUR OWN RISK !!
178
179           (optional, string, default "normal")
180
181       ERS_InstanceName
182           Only used in a Master/Slave resource configuration: The full
183           qualified SAP enqueue replication instance name. e.g.
184           P01_ERS02_sapp01ers. Usually this is the name of the SAP instance
185           profile. The enqueue replication instance must be installed, before
186           you want to configure a master-slave cluster resource.
187
188           The master-slave configuration in the cluster must use this
189           properties: clone_max = 2 clone_node_max = 1 master_node_max = 1
190           master_max = 1
191
192           (unique, optional, string, no default)
193
194       ERS_START_PROFILE
195           Only used in a Master/Slave resource configuration: The parameter
196           ERS_InstanceName must also be set in this configuration. The name
197           of the SAP START profile. Specify this parameter, if you have
198           changed the name of the SAP START profile after the default SAP
199           installation. As SAP release 7.10 does not have a START profile
200           anymore, you need to specify the Instance Profile than.
201
202           (unique, optional, string, no default)
203
204       PRE_START_USEREXIT
205           The full qualified path where to find a script or program which
206           should be executed before this resource gets started.
207
208           (optional, string, no default)
209
210       POST_START_USEREXIT
211           The full qualified path where to find a script or program which
212           should be executed after this resource got started.
213
214           (optional, string, no default)
215
216       PRE_STOP_USEREXIT
217           The full qualified path where to find a script or program which
218           should be executed before this resource gets stopped.
219
220           (optional, string, no default)
221
222       POST_STOP_USEREXIT
223           The full qualified path where to find a script or program which
224           should be executed after this resource got stopped.
225
226           (optional, string, no default)
227
228       IS_ERS
229           Only used for ASCS/ERS SAP Netweaver installations without
230           implementing a master/slave resource to allow the ASCS to 'find'
231           the ERS running on another cluster node after a resource failure.
232           This parameter should be set to true 'only' for the ERS instance
233           for implementations following the SAP NetWeaver 7.40 HA
234           certification (NW-HA-CLU-740). This includes also systems for
235           NetWeaver less than 7.40, if you like to implement the
236           NW-HA-CLU-740 scenario.
237
238           (optional, boolean, default false)
239
240       MINIMAL_PROBE
241           Setting MINIMAL_PROBE=true forces the resource agent to do only
242           minimal check during a probe. This is needed for special file
243           system setups. The MINIMAL_PROBE=true is only supported, if
244           requested either by your vendor's support or if described in an
245           architecture document from your HA vendor.
246
247           (optional, boolean, default false)
248

SUPPORTED ACTIONS

250       This resource agent supports the following actions (operations):
251
252       start
253           Starts the resource. Suggested minimum timeout: 180s.
254
255       stop
256           Stops the resource. Suggested minimum timeout: 240s.
257
258       status
259           Performs a status check. Suggested minimum timeout: 60s.
260
261       monitor
262           Performs a detailed status check. Suggested minimum timeout: 60s.
263           Suggested interval: 120s.
264
265       monitor (Slave role)
266           Performs a detailed status check. Suggested minimum timeout: 60s.
267           Suggested interval: 121s.
268
269       monitor (Master role)
270           Performs a detailed status check. Suggested minimum timeout: 60s.
271           Suggested interval: 119s.
272
273       promote
274           Promotes the resource to the Master role. Suggested minimum
275           timeout: 320s.
276
277       demote
278           Demotes the resource to the Slave role. Suggested minimum timeout:
279           320s.
280
281       reload
282           Suggested minimum timeout: 320s.
283
284       validate-all
285           Performs a validation of the resource configuration. Suggested
286           minimum timeout: 5s.
287
288       meta-data
289           Retrieves resource agent metadata (internal use only). Suggested
290           minimum timeout: 5s.
291
292       methods
293           Suggested minimum timeout: 5s.
294

EXAMPLE CRM SHELL

296       The following is an example configuration for a SAPInstance resource
297       using the crm(8) shell:
298
299           primitive p_SAPInstance ocf:heartbeat:SAPInstance \
300             params \
301               InstanceName=string \
302             op monitor depth="0" timeout="60s" interval="120s" \
303             op monitor depth="0" timeout="60s" interval="121s" role="Slave" \
304             op monitor depth="0" timeout="60s" interval="119s" role="Master"
305
306           ms ms_SAPInstance p_SAPInstance \
307             meta notify="true" interleave="true"
308

EXAMPLE PCS

310       The following is an example configuration for a SAPInstance resource
311       using pcs(8)
312
313           pcs resource create p_SAPInstance ocf:heartbeat:SAPInstance \
314             InstanceName=string \
315             op monitor OCF_CHECK_LEVEL="0" timeout="60s" interval="120s" \
316             op monitor OCF_CHECK_LEVEL="0" timeout="60s" interval="121s" role="Slave" \
317             op monitor OCF_CHECK_LEVEL="0" timeout="60s" interval="119s" role="Master" promotable
318

SEE ALSO

320       http://clusterlabs.org/
321

AUTHOR

323       ClusterLabs contributors (see the resource agent source for information
324       about individual authors)
325
326
327
328resource-agents UNKNOWN           03/25/2021           OCF_HEARTBEAT_SAPINS(7)
Impressum