[Pacemaker] Clone set members colocation
Florian Haas
florian at hastexo.com
Tue Nov 8 23:29:22 CET 2011
On 2011-11-08 22:42, Yves Trudeau wrote:
> 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"
You're meaning to manage an IP range, right? If so, then you're missing
unique_clone_address="true" here.
I also don't quite understand what you're trying to do with these "IP"
attributes, but that doesn't look like it's relevant here.
> 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
That location constraint would not trigger on nodes where the "readerOK"
attribute is not defined at all. Is that intentional? If not, I'd put:
location No-reader-vip-loc reader_vips \
rule $id="No-reader-vip-rule" -inf: \
not_defined readerOK or readerOK eq 0
> colocation reader_vips_dislike_reader_vips -200: reader_vips reader_vips
What is _that_ meant to achieve?
> 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
That I'd consider expected. As I understand it, your resource stickiness
keeps the clone instance where it is.
> Is there a way to make it come back normally or is there something I
> don't do correctly?
Try removing the resource stickiness score from rsc_defaults.
Cheers,
Florian
--
Need help with High Availability?
http://www.hastexo.com/now
More information about the Pacemaker
mailing list