<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">I see the same behavior as Andrei.  On a two-node test cluster (symmetric-cluster=true, resource-stickiness=100) I configure a simple Dummy resource and add the rule<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">      <rsc_location id="dummy_loc" rsc="dummy"><o:p></o:p></p>
<p class="MsoNormal">        <rule score="-10000" id="dummy_loc-rule-0"><o:p></o:p></p>
<p class="MsoNormal">          <expression attribute="mgmt" operation="lt" value="1" type="number" id="dummy_loc-rule-0-expression"/><o:p></o:p></p>
<p class="MsoNormal">        </rule><o:p></o:p></p>
<p class="MsoNormal">      </rsc_location><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If I then change the value of ‘mgmt’ to zero for both nodes, the resource stops.  We have code much like Andrei outlined to work around this behavior.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<br>
Chris<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">
<b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Users <users-bounces@clusterlabs.org><br>
<b>Date: </b>Monday, April 19, 2021 at 10:28 AM<br>
<b>To: </b>Cluster Labs - All topics related to open-source clustering welcomed <users@clusterlabs.org><br>
<b>Subject: </b>Re: [ClusterLabs] Question about ping nodes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">On Sun, 2021-04-18 at 17:31 +0300, Andrei Borzenkov wrote:<br>
> On 18.04.2021 08:41, Andrei Borzenkov wrote:<br>
> > On 17.04.2021 22:41, Piotr Kandziora wrote:<br>
> > > Hi,<br>
> > > <br>
> > > Hope some guru will advise here ;)<br>
> > > <br>
> > > I've got two nodes cluster with some resource placement dependent<br>
> > > on ping<br>
> > > node visibility (<br>
> > > <a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/high_availability_add-on_reference/s1-moving_resources_due_to_connectivity_changes-haar">https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/high_availability_add-on_reference/s1-moving_resources_due_to_connectivity_changes-haar</a><br>
> > > ).<br>
> > > <br>
> > > Is it possible to do nothing with these resources when both nodes<br>
> > > do not<br>
> > > have access to the ping node?<br>
> > > <br>
> > > Currently, when the ping node is unavailable (node itself becomes<br>
> > > unavailable) both nodes stop the resources.<br>
> > > <br>
> > <br>
> > Just use any negative score higher than -INFINITY in location<br>
> > constraint.<br>
> > <br>
> <br>
> No, it does not work. I was mislead by documentation (5.2.1 location<br>
> properties):<br>
<br>
Actually your initial interpretation was correct. Using a non-infinite<br>
negative score for the location constraint should work as expected --<br>
the resource can still run there if there's no better place.<br>
<br>
I'm not sure why you didn't see that in your test, maybe some other<br>
factor prevented it from running?<br>
<br>
BTW another solution to the initial problem would be to use multiple<br>
IPs in the ping agent. It would be less likely for all of them to be<br>
down at the same time without a network issue.<br>
<br>
> <br>
> score:<br>
> <br>
> Negative values indicate the resource(s) should avoid this node (a<br>
> value<br>
> of -INFINITY changes "should" to "must").<br>
> <br>
> I interpreted "should" as "pacemaker will normally avoid this node<br>
> but<br>
> still may chose it if nothing better is possible". It is not what<br>
> happens. Apparently negative score completely prevents assigning<br>
> resource to this node, and "should" here probably means "it is still<br>
> possible that final score may become positive".<br>
> <br>
> As it is not possible to refer to attributes of multiple nodes in a<br>
> rule, you would need something that combines current pingd status for<br>
> individual nodes and makes it available. Logical place is<br>
> ocf:pacemaker:ping resource agent itself.<br>
-- <br>
Ken Gaillot <kgaillot@redhat.com><br>
<br>
_______________________________________________<br>
Manage your subscription:<br>
<a href="https://lists.clusterlabs.org/mailman/listinfo/users">https://lists.clusterlabs.org/mailman/listinfo/users</a>
<br>
<br>
ClusterLabs home: <a href="https://www.clusterlabs.org/">https://www.clusterlabs.org/</a>
<o:p></o:p></p>
</div>
</div>
</body>
</html>