SAPHanaSR-alert-fencing(7)

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

🌸 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.py action_on_lost=fence
  • resource agent SAPHanaController ON_FAIL_ACTION=fence
  • resource agent SAPHanaFilesystem ON_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 πŸ‘‘

  1. Pacemaker 2.1.2 or newer.
  2. SAP HANA scale-out performance-optimised scenario. no HANA host auto-failover, which means no standby nodes.
  3. only one SID is controlled by the Linux cluster.
  4. site names and host names should not be changed.
  5. no other alert agent should be configured for the fencing alert.
  6. user hacluster is a member of group haclient. both are defined locally on each cluster nodes.
  7. user hacluster needs password-less sudo permission on "/usr/bin/SAPHanaSR-hookHelper --sid=ANY --case=echoBe".
  8. concurrent fencing is configured β€” see manual page SAPHanaSR-ScaleOut_basic_cluster(7).
  9. SAPHanaFilesystem RA with monitor operations is active.
  10. 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 adapt SBD_DELAY_START in order to avoid fencing loops. see manual page sbd(8).
  11. 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. πŸ’€)
  12. 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.


(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