On Wednesday 25 July 2007, matilda matilda wrote:
> >>> Max Hofer <[EMAIL PROTECTED]> 25.07.2007 12:12 >>>
> >
> > This is a simple assymetric co-location rule (since 2.0.8 all co-location
> > rules are assymetric).
> >
> > This means write a rule that B follows A:
> > <rsc_colocation id="B_follows_A" from="B" to="A" score="INFINITY"/>
>
> Hi Max,
>
> that is exactly what I thought, too.
> BUT: With this constraint, if A is NOT started, B wouldn't be started
> either. And I want B to be started in this case totally independent of A.
It really would help if you just attached the CIB before and after you started 
resource A. ;-)

What I do when something is not woirking out as i supposed is to create a 
simple CIB with dummy resources which just implements the behaviour I'm 
intersted in (i have quitea collection of how-to-cib-examples.xml 
impelemnting different features).

So if you have a question you can send the CIB and we can try it out and give 
you the answer.

Back to your question.

The behaviour of resource B really depends on following factors:
- resource_stickiness (resource parameter)
- resource_failure_stickiness (resource parameter)
- fail-count of B on the different nodes
- constraints which you put on B

If you did not define the stickiness parameters for B keep in mind that there 
a default cluster values like 'default_resource_stickiness' 
and 'default_resource_failure_stickiness' which are default values.

So it really boils down to following questions:
- what is the resource score of B on all nodes when A is running
- what is the resource score of B on all node when A is not running

To see the resource score use ptest. Here some hints:

* ptest -L -VVVVVVVV 2>&1|grep node_score
will give you the score on the current life system - adapt the grep to filter 
out unwanted info

* you can also use ptest on a stored CIB files by the heartbeat framework

Check the ha-log when your resource B is stopped . You will see  a log message 
like 
"PEngine Input stored in: /var/lib/heartbeat/pengine/<filename>.bz2"

Use the previous stored file (where B was running) and the one shown in the 
log message (where B is stopped) - and check the scores and the rules 
affecting it before and after B was stopped

* to see how the score of B is calculated use following greps

ptest -L -VVVVVVVV 2>&1|grep test_expression|less
ptest -L -VVVVVVVV 2>&1|grep native_rsc_location|less

Once again you can do that on stored CIB files.

Dig into the output of ptest - maybe you find helpfull info.

> > INFINITY is only a suggection. Just make sure the co-location rule has
> > high enough score so that it over powers the resource-stickiness of B (if
> > you defined one - this should be the case if the resource stickiness of B
> > is 0).
>
> Does this mean, that the docu is outdated at this point? Docu says, that at
> the moment (I don't know which moment) only INFINITY and -INFINITY are
> allowed.
Yep outdated. You can really use any resource score. 

> Where do I get informations about the current (2.1.0) rules possible?
As everywhere in technical life the doku is lacking behind the implementation. 
I think you have to wait until someone updates the Info on the page/wiki 
(btw - you can do that on the wiki too)


kind regards Max
_______________________________________________
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