[ClusterLabs] Trying to understand the default action of a fence agent

Ken Gaillot kgaillot at redhat.com
Thu Jan 10 19:45:30 UTC 2019


On Thu, 2019-01-10 at 13:41 -0600, Bryan K. Walton wrote:
> On Tue, Jan 08, 2019 at 01:29:51PM -0600, Bryan K. Walton wrote:
> > On Tue, Jan 08, 2019 at 10:55:09AM -0600, Ken Gaillot wrote:
> > > 
> > > 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
> > > to "off".
> > 
> > Awesome! Thank you, Ken.  I don't know how I've missed this, up to
> > now.
> > Setting this property is exactly what I needed.
> 
> I swear I had this working the other day.  I'm still struggling with
> this, apparently.  I've set the default stonith-action to off:
> 
> [root at storage1 ~]# pcs config | grep -i stonith-action
>  stonith-action: off
> 
> [root at storage1 ~]# pcs config | grep -i stonith-enabled
>   stonith-enabled: true
> 
> But when I run "pcs stonith fence storage2" (from my storage1 node,
> the
> fabric ports are getting sucessfully disabled, and then re-enabled:

stonith-action applies to fence actions initiated by the cluster (e.g.
when a node disappears). When you request a fence action yourself, it
does whatever you requested -- in this case, pcs is doing a reboot by
default. You have to explicitly add --off to get it do "off" instead.

It occurs to me that it might be nice for pcs to follow stonith-action
by default and allow an explicit --off or --reboot.


> Here are the logs that show stonith-ng issuing "off" commands
> (successfully), and then following up with "on" commands:
> 
> Jan 10 13:31:55 storage1 stonith-ng[43051]:  notice: Client
> stonith_admin.44835.f958d69c wants to fence (reboot) 'storage2' with
> device '(any)'
> Jan 10 13:31:55 storage1 stonith-ng[43051]:  notice: Requesting peer
> fencing (off) of storage2
> Jan 10 13:31:55 storage1 stonith-ng[43051]:  notice:
> fenceStorage2-millipede can fence (reboot) storage2: static-list
> Jan 10 13:31:55 storage1 stonith-ng[43051]:  notice:
> fenceStorage2-centipede can fence (reboot) storage2: static-list
> Jan 10 13:31:56 storage1 stonith-ng[43051]:  notice: Operation 'off'
> [44836] (call 2 from stonith_admin.44835) for host 'storage2' with
> device 'fenceStorage2-centipede' returned: 0 (OK)
> Jan 10 13:31:56 storage1 stonith-ng[43051]:  notice: Call to
> fenceStorage2-centipede for 'storage2 off' on behalf of
> stonith_admin.44835 at storage1: OK (0)
> Jan 10 13:31:57 storage1 stonith-ng[43051]:  notice: Operation 'off'
> [44930] (call 2 from stonith_admin.44835) for host 'storage2' with
> device 'fenceStorage2-millipede' returned: 0 (OK)
> Jan 10 13:31:57 storage1 stonith-ng[43051]:  notice: Call to
> fenceStorage2-millipede for 'storage2 off' on behalf of
> stonith_admin.44835 at storage1: OK (0)
> Jan 10 13:31:58 storage1 stonith-ng[43051]:  notice: Operation 'on'
> [44936] (call 2 from stonith_admin.44835) for host 'storage2' with
> device 'fenceStorage2-centipede' returned: 0 (OK)
> Jan 10 13:31:58 storage1 stonith-ng[43051]:  notice: Call to
> fenceStorage2-centipede for 'storage2 on' on behalf of
> stonith_admin.44835 at storage1: OK (0)
> Jan 10 13:32:00 storage1 stonith-ng[43051]:  notice: Operation 'on'
> [44942] (call 2 from stonith_admin.44835) for host 'storage2' with
> device 'fenceStorage2-millipede' returned: 0 (OK)
> Jan 10 13:32:00 storage1 stonith-ng[43051]:  notice: Call to
> fenceStorage2-millipede for 'storage2 on' on behalf of
> stonith_admin.44835 at storage1: OK (0)
> Jan 10 13:32:00 storage1 stonith-ng[43051]:  notice: Operation reboot
> of
> storage2 by storage1 for stonith_admin.44835 at storage1.0b0f51e0: OK
> Jan 10 13:32:00 storage1 crmd[43055]:  notice: Peer storage2 was
> terminated (reboot) by storage1 on behalf of stonith_admin.44835: OK
> 
> Any ideas what I'm doing wrong?  I'd be happy to provide more mogs,
> if
> desired.
> 
> Thanks!
> Bryan
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> https://lists.clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: 
> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org



More information about the Users mailing list