'\" t .\" Title: ocf_heartbeat_SAPInstance .\" Author: ClusterLabs contributors (see the resource agent source for information about individual authors) .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 06/07/2017 .\" Manual: OCF resource agents .\" Source: resource-agents 4.0.0~rc1-4~bpo8+1 .\" Language: English .\" .TH "OCF_HEARTBEAT_SAPINS" "7" "06/07/2017" "resource-agents 4.0.0~rc1-4~bp" "OCF resource agents" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ocf_heartbeat_SAPInstance \- Manages a SAP instance as an HA resource\&. .SH "SYNOPSIS" .HP \w'\fBSAPInstance\fR\ 'u \fBSAPInstance\fR [start | stop | status | monitor | promote | demote | meta\-data | validate\-all] .SH "DESCRIPTION" .PP 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\*(Aqs own resource in the cluster configuration\&. The resource agent supports the following SAP versions: .PP \- SAP WebAS ABAP Release 6\&.20 \- 7\&.40 .PP \- SAP WebAS Java Release 6\&.40 \- 7\&.40 .PP \- 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\&. .PP 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\*(Aqs status is, independent from other problems that might exist at the same time\&. .PP sapstartsrv knows 4 status colours: .PP \- GREEN = everything is fine .PP \- YELLOW = something is wrong, but the service is still working .PP \- RED = the service does not work .PP \- GRAY = the service has not been started .PP 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\&. .SH "SUPPORTED PARAMETERS" .PP \fBInstanceName\fR .RS 4 The full qualified SAP instance name\&. e\&.g\&. P01_DVEBMGS00_sapp01ci\&. Usually this is the name of the SAP instance profile\&. .sp (unique, required, string, no default) .RE .PP \fBDIR_EXECUTABLE\fR .RS 4 The full qualified path where to find sapstartsrv and sapcontrol\&. Specify this parameter, if you have changed the SAP kernel directory location after the default SAP installation\&. .sp (optional, string, no default) .RE .PP \fBDIR_PROFILE\fR .RS 4 The full qualified path where to find the SAP START profile\&. Specify this parameter, if you have changed the SAP profile directory location after the default SAP installation\&. .sp (optional, string, no default) .RE .PP \fBSTART_PROFILE\fR .RS 4 The name of the SAP START profile\&. Specify this parameter, if you have changed the name of the SAP START profile after the default SAP installation\&. As SAP release 7\&.10 does not have a START profile anymore, you need to specify the Instance Profile than\&. .sp (unique, optional, string, no default) .RE .PP \fBSTART_WAITTIME\fR .RS 4 After that time in seconds a monitor operation is executed by the resource agent\&. Does the monitor return SUCCESS, the start ishandled as SUCCESS\&. This is useful to resolve timing problems with e\&.g\&. the J2EE\-Addin instance\&.Usually the resource agent waits until all services are started and the SAP Management Console reports a GREEN status\&. A double stack installation (ABAP + Java AddIn) consists of an ABAP dispatcher and a JAVA instance\&. Normally the start of the JAVA instance takes much longer than the start of the ABAP instance\&. For a JAVA Instance you may need to configure a much higher timeout for the start operation of the resource in Heartbeat\&. The disadvantage here is, that the discovery of a failed start by the cluster takes longer\&. Somebody might say: For me it is important, that the ABAP instance is up and running\&. A failure of the JAVA instance shall not cause a failover of the SAP instance\&. Actually the SAP MC reports a YELLOW status, if the JAVA instance of a double stack system fails\&. From the resource agent point of view YELLOW means:everything is OK\&. Setting START_WAITTIME to a lower value determines the resource agent to check the status of the instance during a start operation after that time\&. As it would wait normally for a GREEN status, now it reports SUCCESS to the cluster in case of a YELLOW status already after the specified time\&. .sp That is only useful for double stack systems\&. .sp (optional, string, default "3600") .RE .PP \fBAUTOMATIC_RECOVER\fR .RS 4 The SAPInstance resource agent tries to recover a failed start attempt automaticaly one time\&. This is done by killing runing instance processes, removing the kill\&.sap file and executing cleanipc\&. Sometimes a crashed SAP instance leaves some processes and/or shared memory segments behind\&. Setting this option to true will try to remove those leftovers during a start operation\&. That is to reduce manual work for the administrator\&. .sp (optional, boolean, default false) .RE .PP \fBMONITOR_SERVICES\fR .RS 4 Within a SAP instance there can be several services\&. Usually you will find the defined services in the START profile of the related instance (Attention: with SAP Release 7\&.10 the START profile content was moved to the instance profile)\&. Not all of those services are worth to monitor by the cluster\&. For example you properly do not like to failover your SAP instance, if the central syslog collector daemon fails\&. Those services are monitored within the SAPInstance resource agent: .sp \- disp+work .sp \- msg_server .sp \- enserver .sp \- enrepserver .sp \- jcontrol .sp \- jstart .sp That names match the strings used in the output of the command \*(Aqsapcontrol \-nr [Instance\-Nr] \-function GetProcessList\*(Aq\&. 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 .sp (optional, string, default "disp+work|msg_server|enserver|enrepserver|jcontrol|jstart") .RE .PP \fBSHUTDOWN_METHOD\fR .RS 4 Usual a SAP Instance is stopped by the command \*(Aqsapcontrol \-nr InstanceNr \-function Stop\*(Aq\&. SHUTDOWN_METHOD=KILL means to kill the SAP Instance using OS commands\&. SAP processes of the instance are terminated with \*(Aqkill \-9\*(Aq, shared memory is deleted with \*(Aqcleanipc\*(Aq and the \*(Aqkill\&.sap\*(Aq file will be deleted\&. That method is much faster than the gracefull stop, but the instance does not have the chance to say goodbye to other SAPinstances in the same system\&. USE AT YOUR OWN RISK !! .sp (optional, string, default "normal") .RE .PP \fBERS_InstanceName\fR .RS 4 Only used in a Master/Slave resource configuration: The full qualified SAP enqueue replication instance name\&. e\&.g\&. P01_ERS02_sapp01ers\&. Usually this is the name of the SAP instance profile\&. The enqueue replication instance must be installed, before you want to configure a master\-slave cluster recource\&. .sp 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 .sp (unique, optional, string, no default) .RE .PP \fBERS_START_PROFILE\fR .RS 4 Only used in a Master/Slave resource configuration: The parameter ERS_InstanceName must also be set in this configuration\&. The name of the SAP START profile\&. Specify this parameter, if you have changed the name of the SAP START profile after the default SAP installation\&. As SAP release 7\&.10 does not have a START profile anymore, you need to specify the Instance Profile than\&. .sp (unique, optional, string, no default) .RE .PP \fBPRE_START_USEREXIT\fR .RS 4 The full qualified path where to find a script or program which should be executed before this resource gets started\&. .sp (optional, string, no default) .RE .PP \fBPOST_START_USEREXIT\fR .RS 4 The full qualified path where to find a script or program which should be executed after this resource got started\&. .sp (optional, string, no default) .RE .PP \fBPRE_STOP_USEREXIT\fR .RS 4 The full qualified path where to find a script or program which should be executed before this resource gets stopped\&. .sp (optional, string, no default) .RE .PP \fBPOST_STOP_USEREXIT\fR .RS 4 The full qualified path where to find a script or program which should be executed after this resource got stopped\&. .sp (optional, string, no default) .RE .SH "SUPPORTED ACTIONS" .PP This resource agent supports the following actions (operations): .PP \fBstart\fR .RS 4 Starts the resource\&. Suggested minimum timeout: 180\&. .RE .PP \fBstop\fR .RS 4 Stops the resource\&. Suggested minimum timeout: 240\&. .RE .PP \fBstatus\fR .RS 4 Performs a status check\&. Suggested minimum timeout: 60\&. .RE .PP \fBmonitor\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 60\&. Suggested interval: 120\&. .RE .PP \fBmonitor (Slave role)\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 60\&. Suggested interval: 121\&. .RE .PP \fBmonitor (Master role)\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 60\&. Suggested interval: 119\&. .RE .PP \fBpromote\fR .RS 4 Promotes the resource to the Master role\&. Suggested minimum timeout: 320\&. .RE .PP \fBdemote\fR .RS 4 Demotes the resource to the Slave role\&. Suggested minimum timeout: 320\&. .RE .PP \fBvalidate\-all\fR .RS 4 Performs a validation of the resource configuration\&. Suggested minimum timeout: 5\&. .RE .PP \fBmeta\-data\fR .RS 4 Retrieves resource agent metadata (internal use only)\&. Suggested minimum timeout: 5\&. .RE .PP \fBmethods\fR .RS 4 Suggested minimum timeout: 5\&. .RE .SH "EXAMPLE CRM SHELL" .PP The following is an example configuration for a SAPInstance resource using the \fBcrm\fR(8) shell: .sp .if n \{\ .RS 4 .\} .nf primitive p_SAPInstance ocf:heartbeat:SAPInstance \e params \e InstanceName=\fIstring\fR \e op monitor depth="0" timeout="60" interval="120" \e op monitor depth="0" timeout="60" interval="121" role="Slave" \e op monitor depth="0" timeout="60" interval="119" role="Master" .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf ms ms_SAPInstance p_SAPInstance \e meta notify="true" interleave="true" .fi .if n \{\ .RE .\} .SH "EXAMPLE PCS" .PP The following is an example configuration for a SAPInstance resource using \fBpcs\fR(8) .sp .if n \{\ .RS 4 .\} .nf pcs resource create p_SAPInstance ocf:heartbeat:SAPInstance \e InstanceName=\fIstring\fR \e op monitor depth="0" timeout="60" interval="120" \e op monitor depth="0" timeout="60" interval="121" role="Slave" \e op monitor depth="0" timeout="60" interval="119" role="Master" \-\-master .fi .if n \{\ .RE .\} .SH "SEE ALSO" .PP \m[blue]\fB\%http://clusterlabs.org/\fR\m[] .SH "AUTHOR" .PP \fBClusterLabs contributors (see the resource agent source for information about individual authors)\fR