[Pacemaker] Clone set members colocation

Yves Trudeau y.trudeau at videotron.ca
Tue Nov 8 22:42:31 CET 2011


Hi,
    I am currently working on a replication solution adding logic to the 
mysql RA and I need to be able to turn ON/OFF a virtual IP based on a 
node attribute (Florian suggestion).  In order to achieve this, I 
created a clone set of IPaddr2 RA and a location rule using the node 
attribute setting.  It works almost correctly except that clone members 
stick a bit too much and don't failback.  Here's my config:

node testvirtbox1 \
         attributes IP="10.2.2.160"
node testvirtbox2 \
         attributes IP="10.2.2.161" \
         attributes standby="off"
node testvirtbox3 \
         attributes IP="10.2.2.162" \
         attributes standby="off"
primitive reader_vip_1 ocf:heartbeat:IPaddr2 \
         params ip="10.2.2.171" nic="eth0"
clone reader_vips reader_vip_1 \
         meta globally-unique="true" clone-max="3" clone-node-max="3" 
notify="true" ordered="true" interleave="true"
location No-reader-vip-loc reader_vips \
         rule $id="No-reader-vip-rule" -inf: readerOK eq 0
colocation reader_vips_dislike_reader_vips -200: reader_vips reader_vips
property $id="cib-bootstrap-options" \
         dc-version="1.0.11-a15ead49e20f047e129882619ed075a65c1ebdfe" \
         cluster-infrastructure="openais" \
         expected-quorum-votes="3" \
         stonith-enabled="false" \
         no-quorum-policy="ignore"
rsc_defaults $id="rsc-options" \
         resource-stickiness="100"



- Upon startup, the reader_vips clone are well spread on all 3 nodes
- Running "crm_attribute -N testvirtbox1 -l reboot --name readerOK -s 
mysql_replication -v '0'"  removes the clone set member from 
testvirtbox1 as expected and add it to testvirtbox2 or testvirtbox3
- But... running "crm_attribute -N testvirtbox1 -l reboot --name 
readerOK -s mysql_replication -v '1'" does not make it come back, one of 
the other node still have 2 clone members

Is there a way to make it come back normally or is there something I 
don't do correctly?

Regards,

Yves



More information about the Pacemaker mailing list