[ClusterLabs] Antw: pacemaker fencing

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Tue Sep 5 09:20:18 EDT 2017


>>> Papastavros Vaggelis <psvaggelis at gmail.com> schrieb am 05.09.2017 um 14:43 in
Nachricht
<CAO64vZkt2Jyodwz6LsNH7zS_u=sCW-46D=JOWWfwZWMr_eP+6Q at mail.gmail.com>:
> 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.

What about this sketch:
On every boot: "date >>some_file"
If some_file is older than some time (e.g. 1 hour), delete it (or remove the oldest/first line).
Also during boot: If file has more than n lines, reconfigure local stonith action to off.
Obviously the mechnism can't recover locally from being off after s spacific time... ;-)

Regards,
Ulrich

> 
> 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  ?
> 
> is it mandatory to use two level fencing  for the above case ?
> 
> 
> 
> Sincerely
> 
> Vaggelis Papastavros








More information about the Users mailing list