[ClusterLabs] Trying to understand dampening (ping)
Andrei Borzenkov
arvidjaar at gmail.com
Thu Oct 14 13:59:20 EDT 2021
On 13.10.2021 18:01, martin doc wrote:
> In the ping resource script, there's support for "dampen" in the use of attrd_updater.
>
> My expectation is that it will cause "ping", "no-ping", "ping" to result in the service being continually presented as up rather than to flap about.
>
> In testing I can't demonstrate this, even using attrd_updater directly.
>
> To test out how attrd_updater works, I wrote a small script to do this:
>
> attrd_updater -n my_ping -D
> attrd_updater -n my_ping -p -B 1000 -d 3s
Dampening defines delay before attributes are committed to CIB. Private
attributes are never ever written into CIB, so dampening makes no sense
here. Private attributes are managed by attrd itself and you see the
latest value.
If you change transient attribute (without -p option) value you will see
different values reported by
attrd_updater -n my_ping -Q
and
cibadmin -Q -A "//nvpair[@name='my_ping']"
until dampening timeout expires.
This applies even to deleting attribute.
Somewhat interesting is that it is apparently not possible to change
attribute type at all. The very first command that creates attribute
sets its type forever. attrd_updater --delete seems to only delete
value, but does not make attrd forget about this attribute. So to retry
without -p option you need to restart pacemaker ...
... checking source code, --delete translates to operation
PCMK__ATTRD_CMD_UPDATE with empty value. So it only changes value
indeed. No way to actually delete attribute.
> sleep 1
> for i in 0 1 2 3 4 5 6 7 8 9; do
> attrd_updater -n my_ping -Q
> sleep 1
> attrd_updater -n my_ping -p -U 0 -d 3s
> done
>
> The output always has the first line as 1000 and every other line with a valud of "0" - as if there was no dampening actually happening.
>
> Even if I modify the above to do -U 1000, -U 0, -U 1000, doing -Q at any point always shows the last value supplied, with no evidence of any smoothng as a result of dampening.
>
> Is the problem here that the -Q doesn't retrieve the value for my_ping using the same method as is used for resource scripts?
>
> Am I totally misunderstanding how dampening works?
>
> Thanks.
>
>
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>
More information about the Users
mailing list