SAPHanaSR-alert-fencing(7)
πΈ SAPHanaSR-alert-fencing(7) β the alert agent bestie πΈ
okay so real talk, this is the page for SAPHanaSR-alert-fencing, and she lives in the SAPHanaSR family of manuals. Pull up a chair, because this little agent is genuinely iconic and you're gonna want to know her whole deal. π
β¨ NAME β¨
SAPHanaSR-alert-fencing β the alert agent that handles cluster fencing alerts. that's it, that's her whole job, and she does it so well. π
π¦ DESCRIPTION π¦
SAPHanaSR-alert-fencing is what you call when you want to react to Linux cluster fencing alerts. no cap.
so here's the vibe: the Linux cluster has this interface where it can kick off external actions whenever a cluster event happens (that's the alert, bestie). when that fires, the cluster calls an external program β an alert agent β to handle it. and guess who the alert agent is in this story. π
when the Linux cluster has performed a node fencing, it can call SAPHanaSR-alert-fencing on each active cluster node. the agent then checks whether the local node belongs to the same HANA site as the fenced node. if it does β boom, it reboots the local node as well. matching energy, matching consequences. π₯
this genuinely levels up four use cases for HANA scale-out:
- HA/DR provider hook script
susChkSrv.pyaction_on_lost=fence - resource agent
SAPHanaControllerON_FAIL_ACTION=fence - resource agent
SAPHanaFilesystemON_FAIL_ACTION=fence - pacemaker service
PCMK_fail_fast=yes
also, go read these manuals, they're the supporting cast and they ate: ocf_suse_SAPHanaController(7), ocf_suse_SAPHanaFilesystem(7), SAPHanaSR-ScaleOut_basic_cluster(7) and susChkSrv.py(7). π
π SUPPORTED PARAMETERS π
timeoutβ if the alert agent doesn't finish within this amount of time, she gets terminated. no negotiating. optional, default is"30s". example:"meta timeout=30s".alert_uptime_thresholdβ how long a node has to be up and running (uptime) before fencing alerts get processed at all. this is the anti-fencing-loop safety rail, and lowkey it's doing the most important work here. optional, default is"300". example:"attributes alert_uptime_threshold=300".
β RETURN CODES β
0β successful program execution, we love a happy ending π«Ά>0β usage, syntax or execution errors. it's giving "something went sideways" π
on top of that, log entries get written, and you can scan for them with a pattern like "SAPHanaSR-alert-fencing".
π EXAMPLES π
π example configuration for the fencing alert handler
these lines need to be added to the cluster's CIB:
alert fencing-1 "/usr/bin/SAPHanaSR-alert-fencing" \
select fencing \
attributes alert_uptime_threshold=300
π example for configuring the alert agent by using crm
this is the alternate way to configure the alert agent, if that's more your lane:
# crm configure alert fencing-1 "/usr/bin/SAPHanaSR-alert-fencing"
select fencing
π showing all configured alert agents
# crm configure show type:alert
π showing agent messages
# grep SAPHanaSR-alert-fencing /var/log/messages
π showing history of fence actions and cleaning it up
in this example, the node with the failed fencing action is node22.
# crm_mon -1 --include=none,fencing
# stonith_admin --cleanup --history node22
π example for manually fencing a node
this one you could do for testing the SAPHanaSR-alert-fencing agent integration.
π¨ bestie, this test should not be done on production systems. understand the impact before trying. see manual page crm_attribute(8) for the details.
the fenced node here is node1.
# crm_attribute -t status -n terminate -v true -N node1
π example for sudo permissions in /etc/sudoers.d/SAPHanaSR
pretty please do not use the real SID here β use the string "ANY". see also manual pages sudoers(5) and SAPHanaSR-hookHelper(8).
# SAPHanaSR-alert-fencing needs
hacluster ALL=(ALL) NOPASSWD: /usr/bin/SAPHanaSR-hookHelper --sid=ANY
--case=echoBe
π FILES π
/usr/bin/SAPHanaSR-alert-fencingβ the alert agent herself./usr/bin/SAPHanaSR-hookHelperβ the hook helper that gets called./run/crm/SAPHanaSR_site_cacheβ the internal cache for host to site relation. do not touch this file, seriously, hands off π/etc/sudoers.d/β directory for sudoers config files./etc/sysconfig/sbdβ config file for the SBD daemon./etc/sysconfig/pacermakerβ config file for the pacemaker daemon.
π REQUIREMENTS π
- Pacemaker 2.1.2 or newer.
- SAP HANA scale-out performance-optimised scenario. no HANA host auto-failover, which means no standby nodes.
- only one SID is controlled by the Linux cluster.
- site names and host names should not be changed.
- no other alert agent should be configured for the fencing alert.
- user
haclusteris a member of grouphaclient. both are defined locally on each cluster nodes. - user
haclusterneeds password-less sudo permission on"/usr/bin/SAPHanaSR-hookHelper --sid=ANY --case=echoBe". - concurrent fencing is configured β see manual page
SAPHanaSR-ScaleOut_basic_cluster(7). SAPHanaFilesystemRA with monitor operations is active.- automatic restart of just fenced nodes should be disabled by adapting
SBD_STARTMODE. in case of automatic restart of just fenced nodes, it might be necessary to adaptSBD_DELAY_STARTin order to avoid fencing loops. see manual pagesbd(8). - the alert agent unconditionally executes fencing. she relies on the preceding fencing decision β neither site role nor SR state is checked. (yes, she trusts you. don't make it weird. π)
- the alert agent runtime almost completely depends on call-outs to OS and Linux cluster.
π BUGS π
if you hit any problem, please use your favourite SAP support process to open a request for the component BC-OP-LNX-SUSE. and for any other feedback and suggestions, hit up feedback@suse.com. we're listening, fr fr. π
π§ SEE ALSO π§
SAPHanaSR-angi(7) , SAPHanaSR-ScaleOut(7) , ocf_suse_SAPHanaController(7) , ocf_suse_SAPHanaFilesystem(7) , susChkSrv.py(7) , crm(8) , fence_sbd(8) , sbd(8) , sudoers(5) , https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Administration/singlehtml/#alert-agents
πΈ AUTHORS πΈ
F.Herschel, L.Pinne.
π COPYRIGHT π
(c) 2024-2026 SUSE LLC
SAPHanaSR-alert-fencing 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 whole page, bestie β¨ this edition of SAPHanaSR-alert-fencing(7) is dated 16 Jan 2026, coming at you from the SAPHanaSR manual family β go forth and fence responsibly π«Άπ
π¦ 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