[ClusterLabs] ocf:pacemaker:ping works strange

Andrei Borzenkov arvidjaar at gmail.com
Tue Dec 12 09:21:34 EST 2023


On Tue, Dec 12, 2023 at 4:47 PM Artem <tyomikh at gmail.com> wrote:
>
>
>
> On Tue, 12 Dec 2023 at 16:17, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
>>
>> On Fri, Dec 8, 2023 at 5:44 PM Artem <tyomikh at gmail.com> wrote:
>> > pcs constraint location FAKE3 rule score=0 pingd lt 1 or not_defined pingd
>> > pcs constraint location FAKE4 rule score=0 pingd lt 1 or not_defined pingd
>> > pcs constraint location FAKE3 rule score=125 pingd gt 0 or defined pingd
>> > pcs constraint location FAKE4 rule score=125 pingd gt 0 or defined pingd
>> >
>>
>> These rules are contradicting. You set the score to 125 if pingd is
>> defined and at the same time set it to 0 if the score is less than 1.
>> To be "less than 1" it must be defined to start with so both rules
>> will always apply. I do not know how the rules are ordered. Either you
>> get random behavior, or one pair of these rules is effectively
>> ignored.
>
>
> "pingd lt 1 or not_defined pingd" means to me ==0 or not_defined, that is ping fails to ping GW or fails to report to corosync/pacemaker. Am I wrong?

That is correct (although I'd reverse conditions out of habit. It
meaningless to check for "less than 1" something that is not defined)

> "pingd gt 0 or defined pingd" means to me that ping gets reply from GW and reports it to cluster.

No. As you were already told this is true if pingd is defined. Value
does not matter.

> Are they really contradicting?

Yes. pingd == 0 will satisfy both rules. My use of "always" was
incorrect, it does not happen for all possible values of pingd, but it
does happen for some.


More information about the Users mailing list