Scroll to navigation

ocf_suse_SAPStartSrv(7) OCF resource agents ocf_suse_SAPStartSrv(7)

NAME

SAPStartSrv - Manages sapstartsv for a single SAP instance as an HA resource.

SYNOPSYS

SAPStartSrv [ start | stop | status | monitor | meta-data | validate-all | usage ]

DESCRIPTION

SAPStartSrv is a resource agent for managing the sapstartsrv process for a single SAP instance as an HA resource.

One SAP instance is defined by having exactly one instance profile. The instance profiles can usually be found in the directory /sapmnt/$SID/profile/. In an Enqueue Replication setup one (ABAP-) Central Services instance ((A)SCS) and at least one Replicated Enqueue instance (ERS) are configured. An Linux HA cluster can control these instances by using the SAPInstance resource agent. That resource agent depends on the SAP sapstartsrv service for starting, stopping, monitoring and probing the instances. The sapstartsrv needs to read the respective instance profile. By default one system-wide sapstartsrv is started at Linux boot time to provide the needed service for all SAP instances.

For specific Enqueue Replication setups using instance specific sapstartsrv processes might be desireable. So each SAP instance is managed on its own by a pair of one SAPStartSrv and one SAPInstance resource agent. SAPStartSrv starts sapstartsrv for one specific SAP instance. By intention it does not monitor the service. SAPInstance then utilises that service for managing the SAP instance. SAPInstance also is doing in-line recovery of failed sapstartsrv processes. The instance's virtual service IP address is used for contacting the sapstartsrv process. Thus that IP address resource (e.g. IPAddr2, aws-vpc-route53) needs to start before SAPStartSrv.

The described setup is benefitial particularly for public cloud and NFS-based environments. Both NFS shares with instance directories can be mounted statically on all nodes. The HA cluster does not need to control that filesystems. The /usr/sap/sapservices file is stored locally on each cluster node.

SUPPORTED PARAMETERS

This resource agent supports the following parameters:

InstanceName

The full qualified SAP instance name. e.g. P01_DVEBMGS00_sapp01ci. Usually this is the name of the SAP instance profile.
Unique, required, string, no default.

START_PROFILE

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.
Unique, optional, string, no default.

SUPPORTED ACTIONS

This resource agent supports the following actions (operations):

start

Starts the sapstartsrv resource.
Suggested minimum timeout: 60.

stop

Stops the sapstartsrv resource.
Suggested minimum timeout: 60.

status

Performs a minimal status check of the sapstartsrv resource.
Suggested minimum timeout: 60.

monitor

The SAPStartSrv resource must by intention not define a monitor operation. This is, because the failing sapstartsrv must never force a SAPInstance restart. That would happen because the two resources reside in one resource group.

validate-all

Performs a validation of the resource configuration.
Suggested minimum timeout: 5.

meta-data

Retrieves resource agent metadata (internal use only).
Suggested minimum timeout: 5.

RETURN CODES

The return codes are defined by the OCF cluster framework. Please refer to the OCF definition on the website mentioned below.

EXAMPLES

* Example configuration for SAP ASCS instance resource group in an ENSA2 setup.
SAP system name is EVA, SAP service is ASCS, SAP instance number is 00, SAP virtual hostname is sapeva. An loadbalancer is used together with dedicated IP netmask configuration for specific public cloud environments. The SAPInstance has been given a fencing priority, a crm property priority-fencing-delay is needed to make this work. See SAPStartSrv_basic_cluster(7). The shown SAPInstance monitor timeout is a trade-off between fast recovery of the ASCS vs. resilience against sporadic temporary NFS issues. You may slightly increase it to fit your infrastructure. Too short ASCS monitor timeouts likely will conflict with the instance´s internal recovery. The also needed ERS instance group and location constraint is shown in another example.

primitive rsc_SAPStartSrv_EVA_ASCS00 ocf:suse:SAPStartSrv \
params InstanceName=EVA_ASCS00_sapeva

primitive rsc_SAPInstance_EVA_ASCS00 SAPInstance \
op monitor interval=11 timeout=60 on-fail=restart \
params InstanceName=EVA_ASCS00_sapeva \
START_PROFILE=/sapmnt/EVA/profile/EVA_ASCS00_sapeva \
AUTOMATIC_RECOVER=false \
MINIMAL_PROBE=true \
meta resource-stickiness=5000 \
priority=100

primitive rsc_IPAddr2_EVA_ASCS00 IPaddr2 \
params ip=192.168.178.188 cidr_netmask=32

primitive rsc_Loadbalancer_EVA_ASCS00 azure-lb \
params port=85085

group grp_EVA_ASCS00 \
rsc_Loadbalancer_EVA_ASCS00 \
rsc_IPAddr2_EVA_ASCS00 \
rsc_SAPStartSrv_EVA_ASCS00 \
rsc_SAPInstance_EVA_ASCS00 \
meta resource-stickiness=3000

* Example configuration for SAP ERS instance resource group in an ENSA2 setup.
SAP system name is EN2, SAP service is ERS, SAP instance number is 10, SAP virtual hostname is sapeva. An IP address is configured as usual for on-premise use. If possible, the ERS instance should run on a different node than the ASCS. The also needed ASCS instance group is shown in another example.

primitive rsc_SAPStartSrv_EN2_ERS10 ocf:suse:SAPStartSrv \
params InstanceName=EN2_ERS10_sapen2er

primitive rsc_SAPInstance_EN2_ERS10 SAPInstance \
op monitor interval=11s timeout=60s \
params InstanceName=EN2_ERS10_sapen2er \
START_PROFILE=/sapmnt/EN2/profile/EN2_ERS10_sapen2er \
AUTOMATIC_RECOVER=false IS_ERS=true MINIMAL_PROBE=true

primitive rsc_IPAddr2_EN2_ERS10 IPaddr2 \
params ip=192.168.178.187

group grp_EN2_ERS10 \
rsc_IPAddr2_EN2_ERS10 \
rsc_SAPStartSrv_EN2_ERS10 \
rsc_SAPInstance_EN2_ERS10

colocation col_EN2_ASCS00_separate \
-5000: grp_EN2_ERS10 grp_EN2_ASCS00

order ord_EN2_ASCS00_first \
Optional: rsc_SAPInstance_EN2_ASCS00:start \
rsc_SAPInstance_EN2_ERS10:stop \
symmetrical=false

* Example SAP ASCS instance profile adapted for ENSA2 HA setup.
SAP SID is EN2, instance number is 00, virtual hostname is sapen2er, service is _ENQ . Optionally you could limit the number of restarts of services, this is not done here. The instance profile /sapmnt/EN2/profile/EN2_ASCS00_sapen2er is adpated like this:

# ... some more above
_ENQ = enq.sap$(SAPSYSTEMNAME)_$(INSTANCE_NAME)
Execute_04 = local rm -f $(_ENQ)
Execute_05 = local ln -s -f $(DIR_EXECUTABLE)/enq_server$(FT_EXE) $(_ENQ)
Start_Program_01 = local $(_ENQ) pf=$(_PF)
# some more below ...

* Example SAP ERS instance profile adapted for ENSA2 HA setup.
SAP SID is EN2, instance number is 10, virtual hostname is sapen2er, service is _ENQR . See also man page sap_suse_cluster_connector(8). The instance profile /sapmnt/EN2/profile/EN2_ERS10_sapen2er is adpated like this:

# ... some more above
_ENQR = enqr.sap$(SAPSYSTEMNAME)_$(INSTANCE_NAME)
Execute_02 = local rm -f $(_ENQR)
Execute_03 = local ln -s -f $(DIR_EXECUTABLE)/enq_replicator$(FT_EXE) $(_ENQR)
Start_Program_00 = local $(_ENQR) pf=$(_PF) NR=$(SCSID)
service/halib_cluster_connector = /usr/bin/sap_suse_cluster_connector
service/halib = $(DIR_CT_RUN)/saphascriptco.so

* Search for log entries of SAPStartSrv, show errors only:

# grep "SAPStartSrv.*RA.*rc=[1-7,9]" /var/log/messages

* Show failcount for resource rsc_SAPStartSrv_EN2_ERS10 . If the failcount exceeds the migration-threshold, the resource will be moved to another node. See SAPStartSrv_basic_cluster(7).

# cibadmin -Ql | grep rsc_SAPStartSrv_EN2_ERS10.*fail-count

* Manually trigger a SAPStartSrv probe action for instance ADA_ASCS00_engine. Output goes to the usual logfiles.

# OCF_ROOT=/usr/lib/ocf/ \
OCF_RESKEY_InstanceName=ADA_ASCS00_engine \
OCF_RESKEY_CRM_meta_interval=0 \
/usr/lib/ocf/resource.d/suse/SAPStartSrv monitor

FILES

/usr/lib/ocf/resource.d/suse/SAPStartSrv
the resource agent
/usr/lib/ocf/resource.d/heartbeat/SAPInstance
the also needed SAP instance resource agent, package resource-agents
/usr/sap/$SID/$InstanceName/exe/
default path for the sapstartsrv executable
/sapmnt/$SID/profile/ (resp. /usr/sap/$SID/SYS/profile/)
default path for DIR_PROFILE
/usr/sap/sapservices
SAP profiles definition file
/etc/sap_suse_cluster_connector
sap_suse_cluster_connector configuration, SLE-HA 12

REQUIREMENTS

* At least SAP instances NW7.40 for ENSA1. At least NW7.52 or SAP S/4HANA ABAP Platform 1909 for ENSA2.

* SAPInstance resource agent with MINIMAL_PROBE support, November 2020.

* Needed NFS shares (e.g. /sapmnt/$SID/, /usr/sap/$SID/) mounted statically or by automounter.

* Directory /usr/sap/ locally read-write mounted on each cluster node.

* Complete entries in /usr/sap/sapservices file.

* SAP instance profile Autostart feature is disabled for ASCS and ERS.

* For ENSA1 and ENSA2 HA setups, the ASCS instance profile entry for the enqueue service _ENQ, Restart_Program_xx is replaced by Start_Program_xx. Same for the ERS instance profile entry for the enqueue replicator service _ENQR. Other services stay untouched.

* The sapinit boot script does not read entries from sapservices file at boot. Thus services sapping and sappong to handle sapservices file at system boot.

* The sapinit script is not used while the HA cluster is running on any node.

* SAP instance numbers controlled by the cluster must be unique.

* It is not allowed to block resources from being controlled manually. Thus BLOCK_RESOURCES in /etc/sap_suse_cluster_connector is not allowed anymore.

* You need SAP hostagent installed and started on your systems. For SystemV style, the sapinit script needs to be enabled. For systemd style, the service saphostagent needs to be enabled and running. Instance services SAP${SID}_${INO} need to be disabled. The systemd enabled saphostagent and sapstartsrv is supported from sapstartsrv-resource-agents 0.9.1 onwards. An appropriate SAPInstance resource agent is needed, newer than November 2021. Please refer to the OS documentation for the systemd version. Please refer to SAP documentation for the SAP HANA version. Combining systemd style hostagent with SystemV style instance is allowed. However, all nodes in one Linux cluster have to use the same style.

BUGS

The trace_ra resourcre tracing feature is not implemented so far.
Please report feedback and suggestions to feedback@suse.com.

SEE ALSO

ocf_heartbeat_SAPInstance(7) , ocf_heartbeat_IPaddr2(7) , SAPStartSrv_basic_cluster(7) , systemctl(1) , sapservices-move(8) , sap_suse_cluster_connector(8) , crm(8) , nfs(5) , mount(8) , ha_related_suse_tids(7) , ha_related_sap_notes(7) ,
https://documentation.suse.com/sbp/all/?context=sles-sap ,
https://www.suse.com/support/kb/doc/?id=000019244 ,
https://www.suse.com/support/kb/doc/?id=000019293 ,
https://www.suse.com/support/kb/doc/?id=000019924 ,
https://www.suse.com/support/kb/doc/?id=000019944 ,
https://www.suse.com/support/kb/doc/?id=7023714 ,
http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-ocf-return-codes.html ,
https://help.sap.com/doc/e9a0eddf6eb14a82bcbe3be3c9a58c7e/1610%20001/en-US/frameset.htm?frameset.htm ,
https://help.sap.com/viewer/fe1db4ed6c5510148f66fbccd85f175f/7.02.22/en-US/47e023f3bf423c83e10000000a42189c.html
https://wiki.scn.sap.com/wiki/display/SI/Troubleshooting+for+Enqueue+Failover+in+ASCS+with+ERS
https://launchpad.support.sap.com/#/notes/1763512 ,
https://launchpad.support.sap.com/#/notes/1872602 ,
https://launchpad.support.sap.com/#/notes/2077934 ,
https://launchpad.support.sap.com/#/notes/2254173 ,
https://launchpad.support.sap.com/#/notes/2464065 ,
https://launchpad.support.sap.com/#/notes/2501860 ,
https://launchpad.support.sap.com/#/notes/2625407 ,
https://launchpad.support.sap.com/#/notes/2630416 ,
https://launchpad.support.sap.com/#/notes/2711036 ,
https://launchpad.support.sap.com/#/notes/2717369 ,
https://launchpad.support.sap.com/#/notes/953653

AUTHORS

X.Arbulu, F.Herschel, L.Pinne

COPYRIGHT

(c) 2020-2022 SUSE LLC
The resource agent SAPStartSrv comes with ABSOLUTELY NO WARRANTY.
For details see the GNU General Public License at http://www.gnu.org/licenses/gpl.html

23 Jun 2022