[Linux-HA] use of pingd

Philippe CAVAILLES philippe.cavailles at tlse.sofreavia.fr
Wed Sep 6 10:23:36 MDT 2006


Sir,
Thank you, for your help.
Further to your suggestion, I have tried the following "cronstraints" 
block and it seems to work:
----------
     <constraints>
       <rsc_location id="group_1:localtion1" rsc="group_1">
         <rule id="group_1:localtion:rule1" score="-INFINITY">
           <expression id="group_1:localtion:rule11" attribute="pingd" 
operation="eq" value="0"/>
         </rule>
       </rsc_location>
       <rsc_location id="group_1:localtion2" rsc="group_1">
         <rule id="group_1:localtion:rule2" score="+INFINITY">
           <expression id="group_1:localtion:rule21" attribute="pingd" 
operation="eq" value="1"/>
         </rule>
       </rsc_location>
     </constraints>
----------

I have now an other question, concerning the same subject:
Now, I want to integrate to some "rules" some "expression" relative to 
the "score" of a particular resource.
How can I get the current score of a resource in order to use it in an 
expression?
Does the score is an attribute ?

I have try thinks like "<expression id="an_id" attribute="score" 
operation="eq" value="100"/>"
but it doesn't seems to work.

The idea is to increment the score of a resource little by little, as 
soon as the network reference come back.

Best regards,
Philippe

Oren Nechushtan a écrit :
> I can suggest from my humble experience:
>
> Preferring a node based on connectivity (based on http://www.linux-ha.org/v2/faq/pingd) 
> Example Constraint
> <rsc_location id="group_1:connected" rsc="group_1">
>     <rule id="group_1:connected:rule" score_attribute="pingd" boolean_op="and">
>        <expression id="group_1:connected:expr:defined"  attribute="pingd" operation="defined"/>
>        <expression id="group_1:connected:expr:positive" attribute="pingd" operation="gt" value="100"/>
>     </rule>
> </rsc_location>
>
> or
>
> Not allowing nodes to run without connectivity 
> <rsc_location id="group_1:connected" rsc="group_1">
>  <rule id="group_1:connected:rule" score="-INFINITY" boolean_op="or">
>    <expression id="group_1:connected:expr:defined"  attribute="pingd" operation="not_defined"/>
>    <expression id="group_1:connected:expr:negative" attribute="pingd" operation="lte" value="0"/>
>   </rule>
> </rsc_location>
>
>
>   
>> -----Original Message-----
>> From: linux-ha-bounces at lists.linux-ha.org 
>> [mailto:linux-ha-bounces at lists.linux-ha.org]On Behalf Of 
>> Philippe CAVAILLES
>> Sent: Wednesday, September 06, 2006 3:14 PM
>> To: linux-ha at lists.linux-ha.org
>> Subject: [Linux-HA] use of pingd
>>
>>
>> Dear all,
>> I use heartbeat v2.0.7 + patch provided by Andrew Beekhof (Filter out 
>> updates that arent for cluster members).
>>
>> I have configured pingd pluging, as specified in 
>> (http://www.linux-ha.org/v2/faq/pingd) and
>> a group of 2 services that run on a symmetric cluster.
>>
>> I want heartbeat to stop all the services of my group on the 
>> node that 
>> has lost the connection
>> with the network reference (the ip address monitored by pingd) and to 
>> restart them when
>> the network reference come back (if they are not already 
>> started on an 
>> other node).
>>
>> I am able to detect the if the network reference is reachable or not 
>> with the
>> command "crm_attribute -V -G -t status -U <node name> -n pingd"
>>
>> But I don't know how to stop and restart how to specify some 
>> stop/restart actions
>> associated to the value of this attribute. Maybe with  some specifics 
>> rules in the
>> <constraint> block?
>>
>> Does someone has an idea?
>>
>> Please find attached the result of the command "cibadmin -Q"
>>
>> Regards,
>> Philippe
>>
>>
>>
>>
>>
>>
>>
>>
>>     
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
>
>   



More information about the Linux-HA mailing list