Daniel Bray wrote:
> On Tue, 2007-03-27 at 10:13 +0200, Andrew Beekhof wrote:
> 
>> You're trying to start pingd by two ways - both by the respawn
>>  directive, and also as a resource.
>>
>>  You can't do that.
>>
>>  And, you're not using the attribute that pingd is creating in your  
>>  CIB.
>>
>>  See http://linux-ha.org/pingd for a sample rule to use a pingd  
>>  attribute
>>  - or you can see my linux-ha tutorial for similar information:
>>     http://linux-ha.org/HeartbeatTutorials - first tutorial listed
>>         starting at about slide 139...
>>
>>  Here's the example from the pingd page:
>>
>>  <rsc_location id="my_resource:not_connected" rsc="my_resource">
>>     <rule id="my_resource:not_connected:rule" score="-INFINITY">
>>        <expression id="my_resource:not_connected:expr"
>>                    attribute="pingd_score" operation="not_defined"/>
>>     </rule>
>>  </rsc_location>
>>
>>  In fact, I'm not 100% sure it's right...
>>
>> it does exactly what the title claims it will:
>>      "Only Run my_resource on Nodes with Access to a Single Ping Node"
>>
>> there are other examples on that page that cover more complicated  
>> scenarios, complete with worked solutions
>>
>>
>>  I think the example from the tutorial is a little more general...
>>
>>  <rsc_location id="my_resource:connected"  rsc="my_resource">
>>   <rule id="my_resource:connected:rule"
>>         score_attribute="pingd" >
>>     <expression id="my_resource:connected:expr:defined"
>>         attribute="pingd"
>>         operation="defined"/>
>>   </rule>
>>  </rsc_location>
>>
>>
>>  What this rule says is:
>>
>>     For resource "my_resource", add the value of the pingd attribute
>>         to the amount score for locating my_resource on a given
>>         machine.
>>
>>  For your example flags to pingd, you use a multiplier (-m flag) of  
>>  100,
>>  so having access to 0 ping nodes is worth zero, 1 ping nodes is worth
>>  100 points, 2 ping nodes is worth 200 points, and so on...
>>
>>  So, if one node has access to a ping node and the other one does not
>>  have access to a ping node, then the first node would get 100 added to
>>  its location score, and the second node would have an unchanged  
>>  location
>>  score.
>>
>>  If the the second node scored as much as 99 points higher than the  
>>  first
>>  node, it would locate the resource on the first node.  If you don't  
>>  like
>>  that, you can change your ping count multiplier, write a different  
>>  rule,
>>  or add a rule.
>>
>>  You can change how much ping node access is worth with the -m flag, or
>>  the "multiplier" attribute in the pingd resource.  Note that you  
>>  didn't
>>  supply a multiplier attribute in your pingd resource - so it would
>>  default to 1 -- probably not what you wanted...
>>
>>  And, don't run pingd twice - especially not with different  
>>  parameters...
> 
> 
> 
> Thanks for the detailed feedback!  
> 
> 
> I've made the alterations you suggested, via the GUI, but saw some
> issues.  I think one of my biggest issues here, is all the documentation
> points to creating XML files by hand, and then "importing" them into the
> cluster.  What I'm trying to do, is strictly use the GUI, so that I can
> do some video documentation for the rest of my team.  Once I have
> everything working, I will distribute the videos so that my team members
> can learn from this.  Unfortunately, things don't always work as
> expected from within the GUI.
> 
> For instance, in your example above:
> 
> <rsc_location id="my_resource:not_connected" rsc="my_resource">
>    <rule id="my_resource:not_connected:rule" score="-INFINITY">
>       <expression id="my_resource:not_connected:expr"
>                   attribute="pingd_score" operation="not_defined"/>
>    </rule>
> </rsc_location>
> 
> You don't have a "value" set for the expression.  In the GUI, it will
> not let you add an expression like that, unless you give it a value.
> Here is my updated config files.

The GUI is running behind where we'd like for it to be, unfortunately
:-(  We added a bunch of features and changed a number of things at a
time when there was little effort being put into the GUI.

By the way, you might be interested in the newly-founded education
sub-project:
        http://linux-ha.org/Education
which has a screencast (video) for a simple GUI operation, here:
        http://linux-ha.org/Education/Newbie/IPaddrScreencast
I haven't finished adding all the audio for it.  Maybe I can do that today?

-- 
    Alan Robertson <[EMAIL PROTECTED]>

"Openness is the foundation and preservative of friendship...  Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
_______________________________________________
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