[ClusterLabs] Trying to understand the default action of a fence agent
kgaillot at redhat.com
Tue Jan 8 16:55:09 UTC 2019
On Tue, 2019-01-08 at 07:35 -0600, Bryan K. Walton wrote:
> I'm building a two node cluster with Centos 7.6 and DRBD. These
> are connected upstream to two Brocade switches. I'm trying to enable
> fencing by using Digimer's fence_dlink_snmp script (
> https://github.com/digimer/fence_dlink_snmp ).
> I've renamed the script to fence_brocade_snmp and have
> created my stonith resources using the following syntax:
> pcs -f stonith_cfg stonith create fenceStorage1-centipede \
> fence_brocade_snmp pcmk_host_list=storage1-drbd ipaddr=10.40.1.1 \
> community=xxxxxxx port=193 pcmk_off_action="off" \
FYI pcmk_off_action="off" is the default
If you want the cluster to request an "off" command instead of a
"reboot" when fencing a node, set the stonith-action cluster property
> When I run "stonith-admin storage1-drbd", from my other node,
> the switch ports do not get disabled. However, when I run
> "stonith_admin -F storage1-drbd", the switch ports DO get disabled.
The pacemaker CLI commands don't always say anything when invalid
option combinations are used (fixing that is one of the many things on
the "would-be-nice" list). Your first command does nothing (and the
forthcoming 2.0.1 version will give a usage error). The second command
is the correct command to fence a node (-F for "off" or -B for
> If I run "pcs stonith fence storage1-drbd", from the other node, the
> response is: "Node: storage1-drbd fenced", but, again, the switch
> are still enabled. I'm forced to instead run: "pcs stonith fence
> storage1-drbd --off" to get the ports to be disabled.
I believe "pcs stonith fence" by default sends a reboot command, so it
sounds like your fence agent doesn't implement reboot (or implements it
incorrectly, or perhaps a reboot is equivalent to disabling the ports
then re-enabling them and so is not useful). I'd use stonith-action=off
as mentioned above.
> What I'm trying to figure out, is under what scenario should I see
> ports actually get disabled? My concern is that, for example, I can
> stop the cluster on storage1-drbd, and the logs will show that the
> fencing was successful, and then my resources get moved. But when I
> check on the switch ports that are connected to storage1-drbd, they
> still enabled. So, the node does not appear to be really fenced.
> Do I need to create my stonith resource differently to actually
> those ports?
> Thank you for your time. I am greatly appreciative.
> Bryan Walton
> Bryan K. Walton 319-337-
> Linux Systems Administrator Leepfrog Technologies,
> ----- End forwarded message -----
More information about the Users