1

This is my current proof-of-concept set up

node ha1
node ha2
primitive HA-mysql lsb:mysql \
        op monitor interval="15s"
primitive VIP ocf:heartbeat:IPaddr2 \
        params ip="10.100.0.10" nic="eth1" \
        op monitor interval="10s"
group HA-Group VIP HA-mysql \
        meta resource-stickiness="101"
location PREFER-NODE1 HA-Group 100: ha1
property $id="cib-bootstrap-options" \
        dc-version="1.0.9-74392a28b7f31d7ddc86689598bd23114f58978b" \
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \
        stonith-enabled="false" \
        no-quorum-policy="ignore"

If I am reading the documentation correctly, setting a stickiness value that is high enough should prevent the problem where resource serving is back to the primary node when it recovers from a failure. By high enough, in this case I should set a stickiness value for HA-Group that is at least

100 < $stickiness-of-group + $stickiness-of-VIP + $stickiness-of-HA-mysql
100 < $stickiness + 0 + 0
100 < $stickiness

so I am using 101.

The desired behavior I am looking for is:

  1. First unplug ha1, then resource group is served by ha2
  2. Re-plug ha1, then resource group is still served by ha2

However, with the current configuration, when I re-plug ha1, the resource group is immediately served by ha1 once it is detected as up.

Another blog post I refer for stickiness: http://foaa.de/old-blog/2010/10/intro-to-pacemaker-part-2-advanced-topics/trackback/index.html#stickiness-vs-location-where-is-the-node-and-where-will-it-stay

P/S: I have used a much higher value for group stickiness, like 200, 500, 1000, but still get the same behavior.

PP/S: my pacemaker version is

ii  pacemaker                           1.0.9.1+hg15626-1            HA cluster resource manager

running on debian squeeze

Linux ha1 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux
Distributor ID: Debian
Description:    Debian GNU/Linux 6.0.6 (squeeze)
Release:        6.0.6
Codename:       squeeze

PPP/S: even if I reduce the configuration to this, the stickiness still won't work

node ha1
node ha2
primitive VIP ocf:heartbeat:IPaddr2 \
        params ip="10.100.0.10" nic="eth1" \
        op monitor interval="10s" \
        meta resource-stickiness="1"
property $id="cib-bootstrap-options" \
        dc-version="1.0.9-74392a28b7f31d7ddc86689598bd23114f58978b" \
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \
        stonith-enabled="false" \
        no-quorum-policy="ignore"
Jeffrey04
  • 145
  • 1
  • 8

1 Answers1

0

Pretty much found the answer myself after struggling for quite some time. Apparently unplugging is not a good simulation even stickiness is set. In order to achieve what the stickiness setting is intending to solve, the server has to be completely dead, or at least have the corosync service down.

Reference: https://www.mail-archive.com/pacemaker@oss.clusterlabs.org/msg16791.html

Jeffrey04
  • 145
  • 1
  • 8