[Pacemaker] Trouble swinging a Shared IP (VIP) upon active mysql instance shutdown
Attila Megyeri
amegyeri at minerva-soft.com
Sun Nov 6 09:00:46 CET 2011
<PATRICKZOBLISEIN at ...> writes:
>
> 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.
>
> 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"
>
>
Hi Patrick,
I am having the exact issue with Pacemaker + Mysql, namely, that mysql is
restarted instead of the VIP being moved to the passive node.
I tried all possible conbinations of migration-threshold, no help.
Were you able to resolve the issue with Andrew's assistance?
Thanks.
More information about the Pacemaker
mailing list