[Pacemaker] Clone set members colocation

Yves Trudeau y.trudeau at videotron.ca
Tue Nov 8 16:42:31 EST 2011

    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=""
node testvirtbox2 \
         attributes IP="" \
         attributes standby="off"
node testvirtbox3 \
         attributes IP="" \
         attributes standby="off"
primitive reader_vip_1 ocf:heartbeat:IPaddr2 \
         params ip="" 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" \
rsc_defaults $id="rsc-options" \

- 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?



More information about the Pacemaker mailing list