OCF_HEARTBEAT_SAPINS(7) | OCF resource agents | OCF_HEARTBEAT_SAPINS(7) |
ocf_heartbeat_SAPInstance - Manages a SAP instance as an HA resource.
SAPInstance [start | stop | status | monitor | promote | demote | meta-data | validate-all]
Usually a SAP system consists of one database and at least one or more SAP instances (sometimes called application servers). One SAP Instance is defined by having exactly one instance profile. The instance profiles can usually be found in the directory /sapmnt/SID/profile. Each instance must be configured as it's own resource in the cluster configuration. The resource agent supports the following SAP versions:
- SAP WebAS ABAP Release 6.20 - 7.40
- SAP WebAS Java Release 6.40 - 7.40
- SAP WebAS ABAP + Java Add-In Release 6.20 - 7.40 (Java is not monitored by the cluster in that case) When using a SAP Kernel 6.40 please check and implement the actions from the section "Manual postprocessing" from SAP note 995116 (http://sdn.sap.com). Other versions may also work with this agent, but have not been verified.
All operations of the SAPInstance resource agent are done by using the startup framework called SAP Management Console or sapstartsrv that was introduced with SAP kernel release 6.40. Find more information about the SAP Management Console in SAP note 1014480. Using this framework defines a clear interface for the Heartbeat cluster, how it sees the SAP system. The options for monitoring the SAP system are also much better than other methods like just watching the ps command for running processes or doing some pings to the application. sapstartsrv uses SOAP messages to request the status of running SAP processes. Therefore it can actually ask a process itself what it's status is, independent from other problems that might exist at the same time.
sapstartsrv knows 4 status colours:
- GREEN = everything is fine
- YELLOW = something is wrong, but the service is still working
- RED = the service does not work
- GRAY = the service has not been started
The SAPInstance resource agent will interpret GREEN and YELLOW as OK. That means that minor problems will not be reported to the Heartbeat cluster. This prevents the cluster from doing an unwanted failover. The statuses RED and GRAY are reported as NOT_RUNNING to the cluster. Depending on the status the cluster expects from the resource, it will do a restart, failover or just nothing.
InstanceName
(unique, required, string, no default)
DIR_EXECUTABLE
(optional, string, no default)
DIR_PROFILE
(optional, string, no default)
START_PROFILE
(unique, optional, string, no default)
START_WAITTIME
That is only useful for double stack systems.
(optional, string, default "3600")
AUTOMATIC_RECOVER
(optional, boolean, default false)
MONITOR_SERVICES
- disp+work
- msg_server
- enserver (ENSA1)
- enq_server (ENSA2)
- enrepserver (ENSA1)
- enq_replicator (ENSA2)
- jcontrol
- jstart
Some other services could be monitored as well. They have to be given with the parameter MONITOR_SERVICES, e.g.:
- sapwebdisp - TREXDaemon.x
That names match the strings used in the output of the command 'sapcontrol -nr [Instance-Nr] -function GetProcessList'. The default should fit most cases where you want to manage a SAP Instance from the cluster. You may change this with this parameter, if you like to monitor more/less or other services that sapstartsrv supports. You may specify multiple services separated by a | (pipe) sign in this parameter: disp+work|msg_server|enserver
(optional, string, default "disp+work|msg_server|enserver|enrepserver|jcontrol|jstart|enq_server|enq_replicator")
SHUTDOWN_METHOD
(optional, string, default "normal")
ERS_InstanceName
The master-slave configuration in the cluster must use this properties: clone_max = 2 clone_node_max = 1 master_node_max = 1 master_max = 1
(unique, optional, string, no default)
ERS_START_PROFILE
(unique, optional, string, no default)
PRE_START_USEREXIT
(optional, string, no default)
POST_START_USEREXIT
(optional, string, no default)
PRE_STOP_USEREXIT
(optional, string, no default)
POST_STOP_USEREXIT
(optional, string, no default)
IS_ERS
(optional, boolean, default false)
MINIMAL_PROBE
(optional, boolean, default false)
This resource agent supports the following actions (operations):
start
stop
status
monitor
monitor (Slave role)
monitor (Master role)
promote
demote
reload
validate-all
meta-data
methods
The following is an example configuration for a SAPInstance resource using the crm(8) shell:
primitive p_SAPInstance ocf:heartbeat:SAPInstance \
params \
InstanceName=string \
op monitor depth="0" timeout="60s" interval="120s" \
op monitor depth="0" timeout="60s" interval="121s" role="Slave" \
op monitor depth="0" timeout="60s" interval="119s" role="Master"
ms ms_SAPInstance p_SAPInstance \
meta notify="true" interleave="true"
The following is an example configuration for a SAPInstance resource using pcs(8)
pcs resource create p_SAPInstance ocf:heartbeat:SAPInstance \
InstanceName=string \
op monitor OCF_CHECK_LEVEL="0" timeout="60s" interval="120s" \
op monitor OCF_CHECK_LEVEL="0" timeout="60s" interval="121s" role="Slave" \
op monitor OCF_CHECK_LEVEL="0" timeout="60s" interval="119s" role="Master" promotable
http://clusterlabs.org/
ClusterLabs contributors (see the resource agent source for information about individual authors)
12/14/2020 | resource-agents UNKNOWN |