[Pacemaker] symmetric (anti-)collocation

Zrin Žiborski zrin+pacemaker at ziborski.net
Tue Dec 21 05:08:00 EST 2010

Hi there,

I've experimented a bit with pacemaker and as far as I can tell (without 
into the source code enough to distinguish a feature from a potential 
the effect of
     colocation X-Y <score>: X Y
is (sometimes something) like
"X gets <score> (added) for running together with Y", while Y "gets 

When the scores are summed up it is irrelevant which resource _seems to_ 
the score, but it makes an important difference when pacemaker is searching
for a solution step by step.

*Example:* ("testres" is a test-RA, Dummy modified to include failure 
and logging):
/lower/ depends on /starter/, but /starter/ should run only when /lower/ 
is running.

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" \

- /starter/ wouldn't run (score -5), but /lower/ "pulls it up", 
/starter/ gets score -5+20=15
- when /lower/ is stopped, /starter/ gets score location+stickiness = 
-5+3 = -2 and stops

Now if the order in the colocation rule is changed to "lower starter",
/starter/ *won't* start, because "it won't get any score from the 
colocation rule,"
or this solution is too far to be found ("before end of the universe?" :)

I'll publish the whole example after a bit more testing - it seems that 
there are some
problems to be solved, like weak dependency behaving like mandatory 
(positive order score
less than inf behaving same as order score inf) or like resources 
getting allocation score
greater then infinity...

native_color: lower allocation score on fo1: 31000000
native_color: lower allocation score on fo2: -3

Best regards,

zrin on #linux-cluster
zrinjz on skype

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20101221/84650631/attachment-0001.html>

More information about the Pacemaker mailing list