[ClusterLabs] pacemaker fencing

Klaus Wenninger kwenning at redhat.com
Tue Sep 5 08:59:08 EDT 2017


On 09/05/2017 02:43 PM, Papastavros Vaggelis wrote:
> Dear friends ,
>
> I have two_nodes (sgw-01 and sgw-02) HA cluster integrated with two
> APC PDUs as fence devices
>
> 1) pcs stonith create node2-psu fence_apc ipaddr="10.158.0.162"
> login="apc" passwd="apc" port="1" pcmk_host_list="sgw-02"
> pcmk_host_check="static-list" action="reboot" power_wait="5" op  
> monitor interval="60s"
> pcs constraint location node2-psu prefers sgw-01=INFINITY
>
>
> 2)pcs stonith create node1-psu fence_apc ipaddr="10.158.0.161"
> login="apc" passwd="apc" port="1" pcmk_host_list="sgw-01"
> pcmk_host_check="static-list" action="reboot" power_wait="5" op
> monitor interval="60s"
> pcs constraint location node1-psu prefers sgw-02=INFINITY
>
>
> Fencing is working fine but i want to deploy the following scenario :
>
> If one node fenced more than x times during a specified time period
> then change the fence action from reboot to stop.
>
> For example if the node rebooted more than 3 times during one hour
> then at the next crash change the fence action from reboot to off.
>
> Is there a proper way to implement the above scenario  ?

I'm not aware of a direct support of this scenario.

But what I could imagine is:
Configure 2 fencing-resources for the same stonith-device on 2 different
levels.
Before these on the same levels you could put a fence-agent (would have
to do it yourself - maybe
derive from fence_dummy in pacemaker package). In this agent you can do
the counting and
you would succeed making pacemaker proceed on the same level or fail to
make pacemaker
try the next level.
Beware that with multiple agents on one level pacemaker always does
on/off and no reboot.
But for the higher level instance you can map the on-action to reboot
and the off-action to metadata.
While for the lower prio level you would just map the on-action to
metadata (to make it do nothing).
 
Regards,
Klaus
>
> is it mandatory to use two level fencing  for the above case ?
>
>
>
> Sincerely
>
> Vaggelis Papastavros
>
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20170905/62d7d5ec/attachment-0003.html>


More information about the Users mailing list