Hi,

On Thu, Nov 29, 2007 at 02:14:51PM -0800, Bill Eaton wrote:
> 
> 
> >> On another thread () I've been trying to figure out how
> to
> >> get pingd to play nicely with hb_gui. One of the
> >> difficulties of this task is understanding
> >> what kind of information pingd provides. Judging from the
> >> examples on the pingd web page, the possible return
> >> values are something like
> >>    defined
> >>    not_defined
> >>    <value>
> 
> > There are not exactly return values. The pingd program,
> > which is either managed by the pingd RA or using the
> > ha.cf respawn directive, just creates an attribute in
> > the status section of the CIB. The value of that
> > attribute depends on the number of nodes it was able to
> > ping (n*multiplier).
> 
> I cannot find anything that looks like a score in the
> status section given by "cibadmin -Ql". What should that
> look like? And again, what does defined or undefined mean?

Look for "pingd". defined means that the attribute is present.

> Curiously, I do see two sets of fail counts that
> should be getting updated, but they are not. Since my
> network cable on one computer is unplugged, one of the
> fail counts should be going up, but it is not changing.
> 
> >> What do these mean? More importantly what does <value>
> >> mean? The first two cannot be used with the gui because
> >> it will not accept the "defined" or "not_defined"
> >> operator without also entering a value. And
> >> it seems that if you enter a value (e.g. " " or "true")
> >> in the gui, heartbeat does not like it.
> 
> > Hmm, not an expert on GUI, but shouldn't you here enter
> the
> > attribute name for the <value> (typically pingd).

This is wrong. I expected the gui to support score_attribute, but
it doesn't.

> Gui expects "attribute", "operation", and "value". I used
> "pingd" for the attribute and have been changing the
> operation, but with no luck.
> 
> >> So then we're left with trying to use <value> for a
> >> failover trigger. I'm trying to figure out how to combine
> >> a location constraint with a pingd clone monitor to get
> >> things to failover. Possible on_fail actions are
> >>    ignore
> >>    block
> >>    stop
> >>    restart
> >>    fence
> >> It's a little unclear what these mean in the context of
> >> a clone and I'm not sure which one to use along with a
> >> pingd location constraint based on
> >> <value>
> 
> > The pingd clone is not important, it just serves to
> > manage the pingd program. The pingd program does all
> > the work. Don't reference that cloned resource in
> > constraints. Just reference the attribute which pingd
> > inserted in the status section (using score_attribute
> > instead of score).
> 
> Gui doesn't support score_attribute, so I have been trying
> to get things to work with score.
> 
> > I suppose that you checked http://linux-ha.org/pingd
> 
> More times than I can count. Regrettably, I cannot use
> the examples in that document because they have things
> that simply are not supported by gui.

True, score_attribute is not supported. But you should be able to
specify all other constraints, such as this one:

<rsc_location id="my_resource:connected" rsc="my_resource">
  <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>
</rsc_location>

That constraint says: don't run my_resource on a node for which
pingd attribute is not defined or its value is not greater than
zero. Did you have problems specifying this one?

Thanks,

Dejan
_______________________________________________
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