Git Product home page Git Product logo

saphanasr-scaleout's Introduction

SUSE ScaleOut resource agent for SAP HANA

Build Status

Introduction

SAPHanaSR Scale-Out provides an automatic failover between SAP HANA nodes with configured System Replication for complex HANA Scale-Out configurations running in two different locations.

This technology is included in the SUSE Linux Enterprise Server for SAP Applications 12 SP2 or later, via the RPM package with the same name.

System replication will help to replicate the database data from one site to another site in order to compensate for database failures. With this mode of operation, internal SAP HANA high-availability (HA) mechanisms and the Linux cluster have to work together.

A HANA scale-out setup already is, to some degree, a HA cluster on its own. The HANA is able to replace failing nodes with standby nodes or to restart certain sub-systems on other nodes. As long as the HANA landscape status is not "ERROR" the Linux cluster will not act. The main purpose of the Linux cluster is to handle the take-over to the other site.

Only if the HANA landscape status indicates that HANA can not recover from the failure and the replication is in sync, then Linux cluster will act. As an exception, the Linux cluster will react if HANA moves the master nameserver role to another candidate.

SAPHanaController is also able to restart former failed worker nodes as standby. In addition to the SAPHanaTopology RA, the SAPHanaSR-ScaleOut solution uses a "HA/DR provider" API provided by HANA to get informed about the current state of the system replication.

For more information, refer to the "SAP HANA System Replication Scale-Out - Performance Optimized Scenario" Best Practices guide

Note: To automate SAP HANA SR in scale-up setups, please use the package SAPHanaSR instead.

License

See the LICENSE file for license rights and limitations.

Contributing

If you are interested in contributing to this project, read the CONTRIBUTING.md for more information.

Feedback

Do you have suggestions for improvement? Let us know!

Go to Issues, create a new issue and describe what you think could be improved.

Feedback is always welcome!

saphanasr-scaleout's People

Contributors

angelabriel avatar clanig avatar diegoakechi avatar dmacvicar avatar fdanapfel avatar fmherschel avatar imanyugin avatar lpinne avatar mguertler avatar oalbrigt avatar suntorytimed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

saphanasr-scaleout's Issues

Error in Ressource Agent function is_clone "compare string with integer"

During the simulation of the resource agents, I got error messages.
It looks like that there are string with integer comparism,

I did this simulation:
CLACT=_clone OCF_RESKEY_CRM_meta_clone_max=2 OCF_RESKEY_DIR_EXECUTABLE=/usr/sap/RH1/HDB00/exe/ OCF_RESKEY_SID=RH1 OCF_RESKEY_InstanceNumber=00 OCF_ROOT=/usr/lib/ocf /usr/lib/ocf/resource.d/heartbeat/SAPHanaTopology status
INFO: DEC: site=DC1, mode=primary, MAPPING=
/usr/lib/ocf/resource.d/heartbeat/SAPHanaTopology: line 316: [: : integer expression expected

Here is the code listing:
305 function is_clone() {
306 super_ocf_log info "FLOW $FUNCNAME ($*)"
307 local rc=0
308 #
309 # is a clone config?
310 #
311 if [ -n "$OCF_RESKEY_CRM_meta_clone_max" ]
312 && [ "$OCF_RESKEY_CRM_meta_clone_max" -gt 0 ]; then
313 #
314 # yes it is a clone config - check, if its configured well
315 #
316 if [ "$OCF_RESKEY_CRM_meta_clone_node_max" -ne 1 ] ; then

Line 311 and Line 316 need to be checked. Integer is compared with string

Then I did the same test with SAPHanaController

CLACT=_clone OCF_RESKEY_CRM_meta_clone_max=1 OCF_RESKEY_DIR_EXECUTABLE=/usr/sap/RH1/HDB00/exe/ OCF_RESKEY_SID=RH1 OCF_RESKEY_InstanceNumber=00 OCF_ROOT=/usr/lib/ocf /usr/lib/ocf/resource.d/heartbeat/SAPHanaController status

INFO: DEC: is_master_nameserver rc=0
INFO: DEC: ===> master_walk: priorities for site DC1 master1=lsh40401 master2=lsh40403 master3= ==> active_master=lsh40401 best_cold_master=
INFO: DEC: ===> master_walk: the_master=lsh40401;
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
/usr/lib/ocf/resource.d/heartbeat/SAPHanaController: line 402: [: : integer expression expected
/usr/lib/ocf/resource.d/heartbeat/SAPHanaController: line 403: [: : integer expression expected
/usr/lib/ocf/resource.d/heartbeat/SAPHanaController: line 404: [: : integer expression expected
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INFO: RA ==== begin action monitor_clone (0.164.2) ====
INFO: RA: SRHOOK01=SOK
INFO: RA: SRHOOK03=SOK
INFO: RA: SRHOOK01=SOK
INFO: RA: SRHOOK03=SOK
4:P:master1:master:worker:master
SOK
...

It is again the function is_clone now in SAPHanaController

Here is the listing:
391 function is_clone() {
392 super_ocf_log info "FLOW $FUNCNAME ($*)"
393 local rc=0
394 #
395 # is a clone config?
396 #
397 if [ -n "$OCF_RESKEY_CRM_meta_clone_max" ]
398 && [ "$OCF_RESKEY_CRM_meta_clone_max" -gt 0 ]; then
399 #
400 # yes it is a clone config - check, if its configured well
401 #
402 if [ "$OCF_RESKEY_CRM_meta_clone_node_max" -ne 1 ] ||
403 [ "$OCF_RESKEY_CRM_meta_master_node_max" -ne 1 ] ||
404 [ "$OCF_RESKEY_CRM_meta_master_max" -ne 1 ]; then
405 super_ocf_log err "ACT: Clone options misconfigured. (expect: clone_node_max=1,master_node_max=1,master_max=1)"
406 exit $OCF_NOT_RUNNING

Line 398 402 403 and 404 needs to be checked.

i will test also some potential fixes.

Classic: SAPHanaController hangs with WAITING4NODES even when all nodes are up and running

SAPHanaSR-showAttr shows that all role attributes for the nodes are set, but SAPHanaController is not able to start the instance, because it claims the nodes are missing.
It seams the detection of the worker roles was broken by code lines like:
read nNsConf nNsCurr nIsConf nIsCurr < <(echo ${nRole//:/ })

If the attributes is "master1::worker:" then the string "worker" is assigned to nNsCurr but not (as attended) to nIsConf.

Fix will follow...

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.