<html><body>
<p>beekhof@gmail.com wrote on 04/28/2009 10:31:43 AM:<br>
&gt;<br>
&gt; On Mon, Apr 27, 2009 at 22:25, Mark Hamzy &lt;hamzy@us.ibm.com&gt; wrote:<br>
&gt; &gt; beekhof@gmail.com wrote on 04/24/2009 11:00:01 AM:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; On Thu, Apr 23, 2009 at 17:49, Mark Hamzy &lt;hamzy@us.ibm.com&gt; wrote:<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt; Not only does this has to be done for all of the resources, but new health<br>
&gt; &gt; metrics must<br>
&gt; &gt; be known to the administrators.<br>
&gt; <br>
&gt; I'd suggest that they should know this sort of thing - much like they<br>
&gt; do with pingd.<br>
&gt; <br>
&gt; This is particularly true when there are multiple health devices as<br>
&gt; the admin needs to decide how to combine the &quot;scores&quot; (and rules are<br>
&gt; designed for exactly this sort of function).<br>
<br>
If you give administrators the choice of how to combine scores, its seems<br>
that there is another potential point of failure being introduced.  Lucky<br>
admins will not see problems where unlucky admins will have to wait until<br>
their machines truly fail before HA moves resources over.<br>
<br>
How about a PE option for pacemaker to automatically calculate health?<br>
Admins could then enable these calculations if they do not want to go<br>
through the effort to investigate all of the health variables and how<br>
they might affect system operations?<br>
<br>
&gt; <br>
&gt; &gt;<br>
&gt; &gt; This is a logistical nightmare. ?What I am proposing is that pacemaker add<br>
&gt; &gt; health<br>
&gt; &gt; scores to nodes. ?Currently, nodes with no rules applied to them start at<br>
&gt; &gt; zero.<br>
&gt; &gt;<br>
&gt; &gt; We want the constraints left alone.<br>
&gt; <br>
&gt; But it is a constraint that you want the system to observe.<br>
&gt; Granted we may not expose it as a constraint (eg. migration-failure or<br>
&gt; standby), but that doesn't change the fact that it is one.<br>
<br>
By setting a PE option, does this now reinforce the notion that constraints<br>
are being implicitly added?<br>
<br>
&gt; <br>
&gt; &gt; &lt;constraints&gt;<br>
&gt; &gt; ?&lt;rsc_location id=&quot;rsc_location_apache_1&quot; rsc=&quot;apache_1&quot;&gt;<br>
&gt; &gt; ? ?&lt;rule id=&quot;prefered_location_apache_1&quot; score=&quot;100&quot;&gt;<br>
&gt; &gt; ? ? ?&lt;expression attribute=&quot;#uname&quot; id=&quot;prefered_location_apache_1_expr&quot;<br>
&gt; &gt; operation=&quot;eq&quot; value=&quot;hs21c&quot;/&gt;<br>
&gt; &gt; ? ?&lt;/rule&gt;<br>
&gt; &gt; ?&lt;/rsc_location&gt;<br>
&gt; &gt; &lt;/constraints&gt;<br>
&gt; &gt;<br>
&gt; &gt; How were you proposing that this should be done under the current<br>
&gt; &gt; rsc_location?<br>
&gt; <br>
&gt; In 1.0.x, rules are reusable, so in the worst case, each additional<br>
&gt; resource &quot;only&quot; need have<br>
&gt; <br>
&gt;   &lt;rsc_location id=&quot;other_health&quot; rsc=&quot;other&quot;&gt;<br>
&gt;     &lt;rule id-ref=&quot;health_location_1_apache_1&quot;/&gt;<br>
&gt;     &lt;rule id-ref=&quot;health_location_2_apache_1&quot;/&gt;<br>
&gt;   &lt;/rsc_location&gt;<br>
<br>
Let me work out what it would look like for a system with two resources<br>
and two health variables.  Currently, an admin would have to write out<br>
four constraints to weight certain resources on certain nodes.  They would<br>
then have to add the two health variables to each resource weighting.<br>
<br>
&lt;constraints&gt;<br>
  &lt;rsc_location id=&quot;prefered_location_apache_1&quot; node=&quot;hs21c&quot; rsc=&quot;apache_1&quot; score=&quot;100&quot;/&gt;<br>
  &lt;rsc_location id=&quot;health_apache_1&quot; rsc=&quot;apache_1&quot;&gt;<br>
    &lt;rule id=&quot;health_location_1_apache_1&quot; score-attribute=&quot;#health-ipmi&quot;&gt;<br>
      &lt;expression attribute=&quot;#health-ipmi&quot; id=&quot;apache_1_ipmi_expr&quot; operation=&quot;defined&quot;/&gt;<br>
    &lt;/rule&gt;<br>
    &lt;rule id=&quot;health_location_2_apache_1&quot; score-attribute=&quot;#health-smart&quot;&gt;<br>
      &lt;expression attribute=&quot;#health-smart&quot; id=&quot;apache_1_smart_expr&quot; operation=&quot;defined&quot;/&gt;<br>
    &lt;/rule&gt;<br>
  &lt;/rsc_location&gt;<br>
  &lt;rsc_location id=&quot;prefered_location_nfs_1&quot; node=&quot;hs21c&quot; rsc=&quot;nfs_1&quot; score=&quot;100&quot;/&gt;<br>
  &lt;rsc_location id=&quot;health_nfs_1&quot; rsc=&quot;nfs_1&quot;&gt;<br>
    &lt;rule id=&quot;health_location_1_nfs_1&quot; score-attribute=&quot;#health-ipmi&quot;&gt;<br>
      &lt;expression attribute=&quot;#health-ipmi&quot; id=&quot;nfs_1_ipmi_expr&quot; operation=&quot;defined&quot;/&gt;<br>
    &lt;/rule&gt;<br>
    &lt;rule id=&quot;health_location_2_nfs_1&quot; score-attribute=&quot;#health-smart&quot;&gt;<br>
      &lt;expression attribute=&quot;#health-smart&quot; id=&quot;nfs_1_smart_expr&quot; operation=&quot;defined&quot;/&gt;<br>
    &lt;/rule&gt;<br>
  &lt;/rsc_location&gt;<br>
&lt;/constraints&gt;<br>
<br>
This is a lot of work for N resources and M health variables.<br>
<br>
In 1.0.x, you can reference previous rule ids in other resources.  So,<br>
you leave the first resource &quot;as is&quot; and then switch the longer health<br>
rules to health rules references in the other resources.<br>
<br>
&lt;constraints&gt;<br>
  &lt;rsc_location id=&quot;prefered_location_apache_1&quot; node=&quot;hs21c&quot; rsc=&quot;apache_1&quot; score=&quot;100&quot;/&gt;<br>
  &lt;rsc_location id=&quot;health_apache_1&quot; rsc=&quot;apache_1&quot;&gt;<br>
    &lt;rule id=&quot;health_location_1&quot; score-attribute=&quot;#health-ipmi&quot;&gt;<br>
      &lt;expression attribute=&quot;#health-ipmi&quot; id=&quot;apache_1_ipmi_expr&quot; operation=&quot;defined&quot;/&gt;<br>
    &lt;/rule&gt;<br>
    &lt;rule id=&quot;health_location_2&quot; score-attribute=&quot;#health-smart&quot;&gt;<br>
      &lt;expression attribute=&quot;#health-smart&quot; id=&quot;apache_1_smart_expr&quot; operation=&quot;defined&quot;/&gt;<br>
    &lt;/rule&gt;<br>
  &lt;/rsc_location&gt;<br>
  &lt;rsc_location id=&quot;prefered_location_nfs_1&quot; node=&quot;hs21c&quot; rsc=&quot;nfs_1&quot; score=&quot;100&quot;/&gt;<br>
  &lt;rsc_location id=&quot;health_nfs_1&quot; rsc=&quot;nfs_1&quot;&gt;<br>
    &lt;rule id-ref=&quot;health_location_1&quot;/&gt;<br>
    &lt;rule id-ref=&quot;health_location_2&quot;/&gt;<br>
  &lt;/rsc_location&gt;<br>
&lt;/constraints&gt;<br>
<br>
While a little typing is saved, you still have to enter information<br>
for each N x M combination.<br>
<br>
&gt; I've also been mulling over the idea of allowing one rule to match<br>
&gt; multiple resources somehow...<br>
&gt; Something like  &lt;rsc_location id=&quot;rsc_location_apache_3&quot; rsc-pattern=&quot;*&quot;&gt;...<br>
&gt; <br>
&gt; Which would again significantly reduce the configuration overhead.<br>
&gt; <br>
&gt; Is this starting to sound a little less aggravating?<br>
<br>
Does this mean that you would have to create a fake resource with<br>
health rules in it?  Something like this:<br>
<br>
&lt;constraints&gt;<br>
  &lt;rsc_location id=&quot;other_health&quot; rsc=&quot;*&quot;&gt;<br>
    &lt;rule id=&quot;health_location_1&quot; score-attribute=&quot;#health-ipmi&quot;&gt;<br>
      &lt;expression attribute=&quot;#health-ipmi&quot; id=&quot;health_location_1_ipmi_expr&quot; operation=&quot;defined&quot;/&gt;<br>
    &lt;/rule&gt;<br>
    &lt;rule id=&quot;health_location_2&quot; score-attribute=&quot;#health-smart&quot;&gt;<br>
      &lt;expression attribute=&quot;#health-smart&quot; id=&quot;health_location_2_smart_expr&quot; operation=&quot;defined&quot;/&gt;<br>
    &lt;/rule&gt;<br>
  &lt;/rsc_location&gt;<br>
  &lt;rsc_location id=&quot;prefered_location_apache_1&quot; node=&quot;hs21c&quot; rsc=&quot;apache_1&quot; score=&quot;100&quot;/&gt;<br>
  &lt;rsc_location id=&quot;prefered_location_nfs_1&quot; node=&quot;hs21c&quot; rsc=&quot;nfs_1&quot; score=&quot;100&quot;/&gt;<br>
&lt;/constraints&gt;<br>
<br>
That is a little bit cleaner.  The health calculations are consolidated<br>
and every resource does not have to bring them in.  However, why should<br>
you have to list them all out if you don't want to?  It could introduce<br>
errors if you forget one.<br>
<br>
&gt; &gt; lmb@suse.de wrote:<br>
&gt; &gt;&gt; Basically your mechanism modifies the &quot;base score&quot; for a node, somewhat<br>
&gt; &gt;&gt; similar to the cluster-wide default set by symmetric-cluster true (0) or<br>
&gt; &gt;&gt; false (-INFINITY).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Sure, but I'd go even beyond this and just add the mechanism for setting<br>
&gt; &gt;&gt; the base score; translating health scores into these can be done outside<br>
&gt; &gt;&gt; the core system.<br>
&gt; <br>
&gt; Also an interesting way to think about it.<br>
&gt; I could see this working if there was only ever one health agent per<br>
&gt; node, but from what you're saying it sounds as if there is likely to<br>
&gt; be many.<br>
&gt; <br>
&gt; Actually, it would still work if the entity responsible for updating<br>
&gt; the node health combined the readings from the different sources into<br>
&gt; a single value.<br>
&gt; However, then you start to require a daemon and some way to configure<br>
&gt; it (in order to specify how the sources should be combined).<br>
&gt; And of course eventually people will want more detail than the<br>
&gt; combined score...  &quot;why is the health red? &quot;.<br>
<br>
Yes.  There is really only one overall health status of a system.  It<br>
can be summed from multiple, independent reporting mechanisms (ipmi,<br>
smart, mcelog, etc).<br>
<br>
I don't think that complex rules need to exist in order to combine<br>
scores.  Any &quot;red&quot; health forces -INF.  All &quot;yellow&quot; healths<br>
keep weighting the resource more and more to a different node.  -INF<br>
plus anything equals -INF.  So a simple merge_weights would work.<br>
<br>
I envision different daemons for each reporting interface.  For example,<br>
if you system supports ipmi, then it will run a daemon that listens to<br>
ipmi events, determines if the event deals with system health, and<br>
then set a #health-ipmi variable to notify HA.<br>
<br>
With this architecture, you don't want another daemon summing up<br>
all #health-* variables that it sees.  There would be a delay as an<br>
event needs to be reported; detected and summed; and then HA detecting<br>
the change and acting.  Also, HA would detect changes to all of the<br>
sub-health variables and not really care about them.  And what<br>
happens if the combining daemon dies?<br>
<br>
&gt; And of course eventually people will want more detail than the<br>
&gt; combined score...  &quot;why is the health red? &quot;.<br>
<br>
Yes.  I think adequate logging would work here.  The ipmi daemon will<br>
notify the log of a fault that it detected as it sets the HA #health-ipmi<br>
variable for example.<br>
<br>
Mark</body></html>