[Pacemaker] Is advisory resource colocation working?

Brice Figureau brice+ha at daysofwonder.com
Sat Aug 15 16:01:40 UTC 2009


Hi,

With Pacemaker 1.0.4, heartbeat 2.99, I was trying the following:
node $id="560dd187-f1d0-408b-b695-8d857d5c5e4d" glusterfs1 \
	attributes standby="on"
node $id="e46f6b38-1a89-45ca-a516-7d84ffc8ecf9" glusterfs2 \
	attributes standby="off"
primitive vip1 ocf:heartbeat:IPaddr2 \
	params ip="172.16.10.165" nic="eth1" cidr_netmask="24" \
	op monitor interval="10s"
primitive vip2 ocf:heartbeat:IPaddr2 \
	params ip="172.16.10.164" nic="eth1" cidr_netmask="24" \
	op monitor interval="10s"


When starting with this configuration, both vip are spread one on each 
node, which is great.
If I standby a node, the running vip moves to the other one. And since 
there is no stickiness defined, when the node is back online the 
resource moves back.

My idea was that adding an advisory colocation rule so that each vip 
would be reluctant to run on the same node except if forced, wouldn't 
change anything to the mix, but I was wrong.

After adding:
colocation vip_s -100: vip2 vip1

And standbying the node running vip1, then it appears vip1 is moved to 
the second node and vip2 doesn't run anymore.

The question is that I don't understand why this happens?
I would have understood this behaviour if I used -inf in the colocation 
rules.

Using showscores.sh I see:
Resource      Score     Node       Stickiness #Fail    Migration-Threshold
vip1          0         glusterfs1 0
vip1          0         glusterfs2 0
vip2          0         glusterfs1 0
vip2          -100      glusterfs2 0

So clearly vip2 score is negative, but not -inf, so it should run, isn't it?

I think there is something I didn't quite get. Can someone enlighten me?
--
Brice Figureau
My Blog: http://www.masterzen.fr/




More information about the Pacemaker mailing list