<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From: </b>Andrei Borzenkov <arvidjaar@gmail.com>, Friday, 15 October 2021 4:59 AM<br>
</font></div>
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>...</b></font></div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">> Dampening defines delay before attributes are committed to CIB.</div>
<div class="PlainText">> Private attributes are never ever written into CIB, so dampening</div>
<div class="PlainText">> makes no sense here. Private attributes are managed by attrd</div>
<div class="PlainText">> itself and you see the latest value.<br>
<br>
> If you change transient attribute (without -p option) value you<br>
> will see different values reported by<br>
<br>
> attrd_updater -n my_ping -Q<br>
<br>
> and<br>
<br>
> cibadmin -Q -A "//nvpair[@name='my_ping']"<br>
<br>
> until dampening timeout expires.<br>
<br>
> This applies even to deleting attribute.<br>
<br>
Ok, now I understand what the dampen function does.</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">If I understand this correctly then this probably makes every documented example of using ocf:pacemaker:ping with a colocation statement wrong because the only way to see the effect of dampen is to use a rule that references the value
of pingd directly. That or the script for ping has a major flaw with respect to dampen.</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">That is when I do this:</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">pcs resource create myPing ocf:pacemaker:ping host_list=192.168.1.1 failure_score=1</div>
<div class="PlainText">pcs resource create database ocf:heartbeat:pgsql</div>
<div class="PlainText">pcs group add pgrp myPing database</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">PCS will move everything to a new node if there is even 1 ping failure because monitor in ping doesn't look at the dampened value, only the value of the immediate returned value.</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">The same is true with colocation statements - if a constraint is made with a ping resource without using a rule that references pingd then the dampen behaviour is ignored completely.</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">Is the ping'er missing something that does this:</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">score=`cibadmin -Q -A "//nvpair[@name='ping']" | sed -e 's/.*value="\([^"]*\)".*/\1/'`</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">before it checks if $score is less than $OCF_RESKEY_failure_score?</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">Thanks</div>
<div class="PlainText"><br>
</div>
</span></font></div>
</body>
</html>