SAPHanaSR-hookHelper(8)

πŸ“¦ version 1.3.4, in opensuse-leap 16.0

🌸 SAPHanaSR-hookHelper(8) β€” the SAPHanaSR manual, bestie edition 🌸

okay so like, this is SAPHanaSR-hookHelper from the SAPHanaSR manual section, and I'm literally about to make it make sense for you. buckle up πŸŽ€


✨ NAME ✨

SAPHanaSR-hookHelper β€” a generic helper for SAP HANA HA/DR provider hook scripts. that's the whole vibe πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

SAPHanaSR-hookHelper [ --help | --version ]
SAPHanaSR-hookHelper --sid=SID --case=use_case

like, either you're asking for help/version, or you're actually running a use case. pick a lane, queen πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

okay so SAPHanaSR-hookHelper is a generic helper for SAP HANA HA/DR provider hook scripts. that's its whole job and it does it slayfully.

right now, three use cases are implemented:

  • checking whether the multi-state resource is in maintenance mode, exactly as described in manual page SAPHanaSR_maitenance_examples(7). periodt.
  • fencing the local node via the cluster, see manual page susChkSrv.py(7).
  • rebooting the local node directly, see manual page SAPHanaSR-alert-fencing(8).

for the deets, scroll on down to SUPPORTED PARAMETERS below 🫢


🌈 OPTIONS 🌈

  • --help β€” shows help. the classic. πŸ₯°
  • --version β€” shows the script version. iykyk.
  • --case=use_case β€” run this use case, bestie.
  • --sid=SID β€” use this SID, no cap.

πŸ‘‘ SUPPORTED PARAMETERS πŸ‘‘

the script supports the following paramters (yes we're keeping that spelling, it's iconic):

  • SID β€” SAP SID to handle. Required. No default. so like, you have to give it one πŸ™ˆ
  • use_case β€” use case to run. at the moment 'checkTakeover', 'fenceMe' and 'echoBe' are supported.
    • checkTakeover : check whether a HANA takeover is running, allow or deny admin action.
    • fenceMe : fence local node by calling 'crm_attribute ... terminate'.
    • echoBe : reboot local node by calling 'echo b >/proc/sysrq-trigger'.
    • Required. No default. again β€” no defaults, no vibes-based guessing πŸ’€

⭐ RETURN CODES ⭐

these are the numbers it hands back to you, and each one has main character energy:

  • 0 β€” takeover requested by cluster, permit takeover. we love a green light πŸ’š
  • 1 β€” not from SAPHanaSR-hookHelper, but passed from called sudo.
  • 4 β€” sr_takeover attribute not found or not set to 'T' and multi-state resource is NOT in maintenance, block takeover. nope, blocked 🚫
  • 5 β€” multi-state resource in maintenance, permit takeover.
  • 6 β€” cluster not available, permit takeover.
  • 7 β€” given SID not configured in the cluster, block takeover. wrong SID, blocked.
  • 42 β€” node fenced on request. the answer to everything πŸ”₯
  • 99 β€” unknown cluster command error, permit takeover.

πŸ“ EXAMPLES πŸ“

checking the system log for when SAPHanaSR-hookHelper has been called

this one's so useful, honestly:

# grep sudo.*SAPHanaSR-hookHelper /var/log/messages

generic sudo permissions in /etc/sudoers.d/SAPHanaSR

example SID is HA1. see also manual pages susTkOver.py(7), susChkSrv.py(7) and sudoers(5).

# SAPHanaSR needs for HA/DR provider hook scripts

Cmnd_Alias HOOK_HELPER  = /usr/bin/SAPHanaSR-hookHelper --sid=HA1
--case=*
ha1adm ALL=(ALL) NOPASSWD: HOOK_HELPER

checking the Linux cluster STONITH setup and logs

these steps are useful with use case 'fenceMe'. first the STONITH method for the local node is shown. then the last successful fencing action is looked up. finally the Linux cluster log is checked for STONITH requests. see also manual pages stonith_admin(8) and susChkSrv.py(7).

# stonith_admin -l $(crm_node -n)
# stonith_admin -h $(crm_node -n)
# grep Requesting.*fencing  /var/log/pacemaker/pacemaker.log

🧚 FILES 🧚

  • /usr/bin/SAPHanaSR-hookHelper β€” the program itself. the moment πŸ’…
  • /usr/share/SAPHanaSR-angi/susTkOver.py , /usr/share/SAPHanaSR-angi/susChkSrv.py β€” calling HA/DR provider hook scripts.
  • /usr/bin/SAPHanaSR-alert-fencing β€” calling alert handler.
  • /tmp/SAPHanaSR_SRHhelper.XXXXXX β€” temporary file, for internal use only. don't touch, bestie πŸ™ˆ
  • /etc/sudoers, /etc/sudoers.d/SAPHanaSR β€” the sudo permissions configuration.

πŸ’€ BUGS πŸ’€

  • command line options of this script will change, since this script is under development. this script is not intended to be called outside HA/DR provider hook scripts or alert handlers. like, fr fr, don't freelance with it 😭
  • in case of any problem, please use your favourite SAP support process to open a request for the component BC-OP-LNX-SUSE. please report any other feedback and suggestions to feedback@suse.com. they actually want your feedback, so cute 🫢

🌸 SEE ALSO 🌸

SAPHanaSR(7) , SAPHanaSR-ScaleOut(7) , susHanaSR.py(7) , susTkOver.py(7) , susChkSrv.py(7) , ocf_suse_SAPHanaTopology(7) , ocf_suse_SAPHanaController(7) , SAPHanaSR-showAttr(8) , SAPHanaSR-alert-fencing(8) , crm(8) , crm_attribute(8) , stonith_admin(8) , sudo(8) , sudoers(5) , https://documentation.suse.com/sbp/sap/

that's the whole reading list, go off πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

A.Briel, F.Herschel, L.Pinne β€” absolute icons, all three of them 🌟


(c) 2022-2026 SUSE LLC

SAPHanaSR-hookHelper comes with ABSOLUTELY NO WARRANTY. for details see the GNU General Public License at http://www.gnu.org/licenses/gpl.html.


and that's the tea β˜• β€” this little beauty is from SAPHanaSR, dated 17 Nov 2025, and it lives at page SAPHanaSR-hookHelper(8). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from