[Pacemaker] Trouble swinging a Shared IP (VIP) upon active mysql instance shutdown
Andrew Beekhof
andrew at beekhof.net
Mon Jun 27 07:30:14 UTC 2011
On Thu, May 12, 2011 at 12:12 AM, <PATRICKZOBLISEIN at comcast.net> wrote:
> Hi All,
> I currently have a 2-node Corosync+Pacemaker cluster configured with a
> Shared IP (VIP). When the active node fails, the VIP swings to the passive
> node and becomes active - this works very well so far.
> Also - on each node is a MySQL instance - a Master/Master replication
> configuration.
> My issue at the moment, is getting Pacemaker configured properly in order to
> swing the shared ip (VIP) when the active MySQL instance is down.
> Whenever I shutdown the mysql service on EITHER node - Pacemaker restarts
> that instance - instead of restarting, I'd really like to see the VIP swing
> to the other node.
Check out migration-threshold in the documentation
> Below is my crm configuration - I understand that the example_mysql1
> primitive is configured to start the mysql instance - but is there a way to
> say instead of "op start" - "op shared_ip_one"?
> I've only started playing with Pacemaker and Corosync and am still digesting
> concepts - so I'm hoping what I'm trying to accomplish is 'simple' and I'm
> not able to see the forest for the trees.
>
> Many thanks in advance,
> Patrick
>
> `crm configure edit`
> node mycluster1.oz.com
> node mycluster2.oz.com
> primitive example_mysql1 ocf:heartbeat:mysql \
> params binary="mysqld_safe" datadir="/var/lib/mysql/data"
> pid="/var/lib/mysql/data/mysql.pid" socket="/var/lib/mysql/data/mysql.sock"
> log="/var/lib/mysql/data/mysql_cluster.log" \
> op start interval="0" timeout="120" \
> op stop interval="0" timeout="120" \
> op monitor interval="10" timeout="30" depth="0"
> primitive shared_ip_one ocf:heartbeat:IPaddr \
> params ip="10.4.1.100" cidr_netmask="255.255.255.0" nic="eth0" \
> op monitor interval="10s"
> ms example_mysql1_master example_mysql1 \
> meta target-role="Slave"
> location cli-prefer-example_mysql1 example_mysql1_master \
> rule $id="cli-prefer-rule-example_mysql1" inf: #uname eq
> mycluster2.oz.com
> location cli-prefer-shared_ip_one shared_ip_one \
> rule $id="cli-prefer-rule-shared_ip_one" inf: #uname eq
> mycluster1.oz.com
> property $id="cib-bootstrap-options" \
> dc-version="1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87" \
> cluster-infrastructure="openais" \
> expected-quorum-votes="2" \
> stonith-enabled="false"
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs:
> http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>
>
More information about the Pacemaker
mailing list