Andrew Beekhof escribió:
On 7/9/07, Adrian Chapela <[EMAIL PROTECTED]> wrote:

Andrew Beekhof escribió:
> On 7/6/07, Adrian Chapela <[EMAIL PROTECTED]> wrote:
>>
>> This rule is quite simple but I can't understand well.
>>
>>          <rule id="my_resource:connected:rule" score="-INFINITY"
>> boolean_op="or">
>>            <expression id="my_resource:connected:expr:undefined"
>> attribute="pingd" operation="not_defined"/>
>>            <expression id="my_resource:connected:expr:zero"
>> attribute="pingd" operation="lte" value="0"/>
>>          </rule>
>>
>> The first expression check if the attribute pingd is defined (I
>> think...) and the second expression compares the same attribute with 0.
>> My problem is, What it's this attribute ?? Who update its value  (I
>> think pingd, but the executable or the OCF script)??
>
>
> the OCF script is just a wrapper for the executable
>
> have you read all of http://www.linux-ha.org/v2/faq/pingd ?

Yes, but I don't understand how can pingd update CIB to change the Score
with this rule ??



it doesn't change the rule, it changes a node attribute named "pingd"
Yes, It was I want to say...

the rule then looks this value up for each node the rule is applied on

How must my script do to update a similar rule ??

I only need a clone and the with a rule change a score to move the
IPAddr resource, can you explain me a bit ??


that depends, when would the IPaddr need to move?
Now, I have a OCF script that starts, stops, etc. the resource. This script evaluate output of the start, status, stop operation and then use the attrd_updater to change value of an attribute. The rule looks this attribute and the change the score to move the resource group.

I want to move IPaddr because I have two mysql servers. One is the master and the other is the slave. Pingd and MySQL must be started in two nodes at the same time and only the VIP can be in one node (master node). When master is down, it has a network failure or a resource failure the VIP must be assigned to the slave. It will be a new master at this time. At this moment I must execute a script to block the connections on the mysql port, look for replication state, etc. but this is another history!


Thank you.
>
>
>
> Now I think in the same rule for other resource:
>>
>>          <rule id="my_resource:connected:rule" score="-INFINITY"
>> boolean_op="or">
>>            <expression id="my_resource:connected:expr:undefined"
>> attribute="my_daemon" operation="not_defined"/>
>>            <expression id="my_resource:connected:expr:zero"
>> attribute="my_daemon" operation="lte" value="0"/>
>>          </rule>
>>
>> How can I do to update the value of this attribute ? If I can update
>> this value, I can force movement the resource group to another node. My >> it's only the rules, I don't understand how the script can to interact
>> with the CIB.
>>
>> Thank you!!
>> _______________________________________________
>> Linux-HA mailing list
>> [email protected]
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
>>
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Best regards,

Thank you!
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to