<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 09/05/2017 02:43 PM, Papastavros
Vaggelis wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAO64vZkt2Jyodwz6LsNH7zS_u=sCW-46D=JOWWfwZWMr_eP+6Q@mail.gmail.com">
<div dir="ltr">
<div>Dear friends ,<br>
<br>
</div>
I have two_nodes (sgw-01 and sgw-02) HA cluster integrated with
two APC PDUs as fence devices<br>
<div><br>
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"<br>
pcs constraint location node2-psu prefers sgw-01=INFINITY<br>
<br>
<br>
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"<br>
pcs constraint location node1-psu prefers sgw-02=INFINITY</div>
<div><br>
</div>
<div><br>
</div>
<div>Fencing is working fine but i want to deploy the following
scenario :</div>
<div><br>
</div>
<div>If one node fenced more than x times during a specified
time period then change the fence action from reboot to stop.
<br>
</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Is there a proper way to implement the above scenario ? <br>
</div>
</div>
</blockquote>
<br>
I'm not aware of a direct support of this scenario.<br>
<br>
But what I could imagine is:<br>
Configure 2 fencing-resources for the same stonith-device on 2
different levels.<br>
Before these on the same levels you could put a fence-agent (would
have to do it yourself - maybe<br>
derive from fence_dummy in pacemaker package). In this agent you can
do the counting and<br>
you would succeed making pacemaker proceed on the same level or fail
to make pacemaker<br>
try the next level.<br>
Beware that with multiple agents on one level pacemaker always does
on/off and no reboot.<br>
But for the higher level instance you can map the on-action to
reboot and the off-action to metadata.<br>
While for the lower prio level you would just map the on-action to
metadata (to make it do nothing).<br>
<br>
Regards,<br>
Klaus<br>
<blockquote type="cite"
cite="mid:CAO64vZkt2Jyodwz6LsNH7zS_u=sCW-46D=JOWWfwZWMr_eP+6Q@mail.gmail.com">
<div dir="ltr">
<div><br>
</div>
<div>is it mandatory to use two level fencing for the above
case ? <br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Sincerely</div>
<div><br>
</div>
<div>Vaggelis Papastavros <br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list: <a class="moz-txt-link-abbreviated" href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a>
<a class="moz-txt-link-freetext" href="http://lists.clusterlabs.org/mailman/listinfo/users">http://lists.clusterlabs.org/mailman/listinfo/users</a>
Project Home: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org">http://www.clusterlabs.org</a>
Getting started: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a>
Bugs: <a class="moz-txt-link-freetext" href="http://bugs.clusterlabs.org">http://bugs.clusterlabs.org</a>
</pre>
</blockquote>
<p><br>
</p>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>