SAPHanaSR-hookHelper(8)
πΈ 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 fromSAPHanaSR-hookHelper, but passed from called sudo.4βsr_takeoverattribute 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 tofeedback@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 π
π COPYRIGHT π
(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
- opensuse-leap 16.0: SAPHanaSR-angi 1.3.4-160000.1.1 Β· GPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms