<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi there,<br>
<br>
I've experimented a bit with pacemaker and as far as I can tell
(without looking<br>
into the source code enough to distinguish a feature from a
potential problem),<br>
the effect of<br>
colocation X-Y <score>: X Y<br>
is (sometimes something) like<br>
"X gets <score> (added) for running together with Y", while Y
"gets nothing".<br>
<br>
When the scores are summed up it is irrelevant which resource <u>seems
to</u> "get"<br>
the score, but it makes an important difference when pacemaker is
searching<br>
for a solution step by step.<br>
<br>
<b>Example:</b> ("testres" is a test-RA, Dummy modified to include
failure and logging):<br>
<i>lower</i> depends on <i>starter</i>, but <i>starter</i> should
run only when <i>lower</i> is running.<br>
<br>
<pre>node fo1 attributes standby="off"
node fo2 attributes standby="off"
primitive lower ocf:custom:testres op monitor interval="10" meta is-managed="true"
primitive starter ocf:custom:testres op monitor interval="10" meta is-managed="true"
location starter_fo1 starter rule $id="starter-fo1-rule" -5: #uname eq fo1
location starter_fo2 starter rule $id="starter-fo2-rule" -5: #uname eq fo2
colocation lower_starter 20: starter lower
order o_starter_lower inf: starter lower symmetrical=true
property $id="cib-bootstrap-options" \
dc-version="1.0.9-unknown" \
cluster-infrastructure="openais" \
expected-quorum-votes="2" \
no-quorum-policy="ignore" \
stonith-enabled="false" \
symmetric-cluster="true" \
last-lrm-refresh="1292600052" \
default-resource-stickiness="3"
</pre>
- <i>starter</i> wouldn't run (score -5), but <i>lower</i> "pulls
it up", <i>starter</i> gets score -5+20=15<br>
- when <i>lower</i> is stopped, <i>starter</i> gets score
location+stickiness = -5+3 = -2 and stops<br>
<br>
Now if the order in the colocation rule is changed to "lower
starter",<br>
<i>starter</i> <b>won't</b> start, because "it won't get any score
from the colocation rule,"<br>
or this solution is too far to be found ("before end of the
universe?" :)<br>
<br>
I'll publish the whole example after a bit more testing - it seems
that there are some<br>
problems to be solved, like weak dependency behaving like mandatory
(positive order score<br>
less than inf behaving same as order score inf) or like resources
getting allocation score<br>
greater then infinity...<br>
<pre>native_color: lower allocation score on fo1: 31000000
native_color: lower allocation score on fo2: -3
</pre>
Best regards,<br>
Zrin<br>
<br>
zrin on #linux-cluster<br>
zrinjz on skype<br>
<br>
</body>
</html>