table of contents
SAPHanaSR-hookHelper(8) | SAPHanaSR | SAPHanaSR-hookHelper(8) |
NAME¶
SAPHanaSR-hookHelper - generic helper for SAP HANA HADR provider hook scripts
SYNOPSIS¶
SAPHanaSR-hookHelper [ --help | --version ]
SAPHanaSR-hookHelper --sid=SID --case=use_case
DESCRIPTION¶
SAPHanaSR-hookHelper is a generic helper for SAP HANA HADR
provider hook scripts.
Currently two use cases are implemented:
- Checking for maintenance mode of the multi-state resource, as described in
manual page SAPHanaSR_maitenance_examples(7).
- Fencing local node, see manual susChkSrv.py(7).
For details, see SUPPORTED PARAMETERS below.
OPTIONS¶
- --help
- show help
- --version
- show script version
- --case=use_case
- run this use case
- --sid=SID
- use this SID
SUPPORTED PARAMETERS¶
The script supports the following paramters:
- SID SAP SID to handle.
-
Required. No default. - use_case Use case to run. At the moment 'checkTakeover' and 'fenceMe' are supported.
- - checkTakeover : check whether a HANA takeover is running, allow or deny
admin action.
- fenceMe : fence local node by calling crm.
Required. No default.
RETURN CODES¶
- 0
- takeover requested by cluster, permit takeover.
- 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.
- 5
- multi-state resource in maintenance, permit takeover.
- 6
- cluster not available, permit takeover.
- 7
- given SID not configured in the cluster, block takeover.
- 42
- node fenced on request.
- 99
- unknown cluster command error, permit takeover.
EXAMPLES¶
* Example for checking the system log for when SAPHanaSR-hookHelper has been called.
* Example for 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).
Cmnd_Alias HOOK_HELPER = /usr/bin/SAPHanaSR-hookHelper --sid=HA1
--case=*
ha1adm ALL=(ALL) NOPASSWD: HOOK_HELPER
* Example for checking the Linux cluster STONITH setup and logs.
This 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 -h $(crm_node -n)
# grep Requesting.*fencing /var/log/pacemaker/pacemaker.log
FILES¶
- /usr/bin/SAPHanaSR-hookHelper
- the program itself
- /usr/share/SAPHanaSR-angi/susTkOver.py , /usr/share/SAPHanaSR-angi/susChkSrv.py
- calling HADR provider hook scripts
- /tmp/SAPHanaSR_SRHhelper.XXXXXX
- temporary file, for internal use only
- /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.
* 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.
SEE ALSO¶
SAPHanaSR(7) , SAPHanaSR-ScaleOut(7) ,
susHanaSR.py(7) , susHanaSrMultiTarget.py(7) ,
susTkOver.py(7) , susChkSrv.py(7) ,
ocf_suse_SAPHanaTopology(7) , ocf_suse_SAPHanaController(7) ,
SAPHanaSR-showAttr(8) , crm(8) , crm_attribute(8) ,
stonith_admin(8) , sudo(8) , sudoers(5),
https://documentation.suse.com/sbp/sap/
AUTHORS¶
A.Briel, F.Herschel, L.Pinne
COPYRIGHT¶
(c) 2022-2025 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
10 Jan 2025 |