GithubHelp home page GithubHelp logo

tubbz-alt / sapstartsrv-resourceagent Goto Github PK

View Code? Open in Web Editor NEW

This project forked from suse/sapstartsrv-resourceagent

0.0 0.0 0.0 81 KB

License: GNU General Public License v2.0

Shell 27.49% Python 72.51%

sapstartsrv-resourceagent's Introduction

Build Status Test Coverage

SAPStartSrv-resourceAgent

pacemaker integration for instance specific sapstartsrv

Overview

This project is to implement a resource-agent for the instance specific SAP start framework. It controls the instance specific sapstartsrv process which provides the API to start, stop and check an SAP instance.

SAPStartSrv does only start, stop and probe for the server process. By intention it does not monitor the service. SAPInstance is doing in-line recovery of failed sapstartsrv processes instead.

SAPStartSrv is to be included into a resource group together with the vIP and the SAPInstance. It needs to be started before SAPInstance is starting and needs to be stopped after SAPInstance has been stopped.

SAPStartSrv could be used since SAP NetWeaver 7.40 or SAP S/4HANA (ABAP Platform >= 1909).

sapping and sappong - agents to hide/unhide the /usr/sap/sapservices files during system boot to avoid that sapstartsrv is started for an SAP Instance. sapping is running before sapinit and sappong is running after sappong.

Resource example

SAPStartSrv could be used where-ever it is not possible to mount/unmount the work directories of the SAPInstances. The example is based on https://documentation.suse.com/sbp/all/single-html/SAP_NW740_SLE12_SetupGuide/. We replace the file system resource by an SAPStartSrv resource.

primitive rsc_sapstartsrv_HA1_ASCS00 ocf:suse:SAPStartSrv \
         params InstanceName=HA1_ASCS00_sapha1as         

group grp_HA1_ASCS00 \
  rsc_ip_HA1_ASCS00 rsc_sapstartsrv_HA1_ASCS00 rsc_sap_HA1_ASCS00 \
     meta resource-stickiness=3000

Note: The resource rsc_sapstartsrv_HA1_ASCS00 does by intention not define a monitoring operation. This is, because the failing sapstartsrv must never force an SAP instance restart which would happen, as the two resources reside in one resource group.

Note: To use the python version of the resource agent, the shebang of the script file must be changed (this is done during the packaging process). Replace #!@PYTHON@ -tt by #!/usr/bin/python3 -tt with the correct python version.

Unit tests

The python version of the resource agent comes with a unit test battery. In order to run them:

cd SAPStartSrv-resourceAgent
virtualenv myvirtenv
source myvirtenv/bin/activate
myvirtenv/bin/pip install pytest-cov mock
myvirtenv/bin/py.test -vv --cov=SAPStartSrv --cov-report term tests

sapstartsrv-resourceagent's People

Contributors

arbulu89 avatar fmherschel avatar lpinne avatar mkoderer avatar yeoldegrove avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.