On Sat, Jan 15, 2011 at 4:32 AM, Alex Forster <[email protected]> wrote:
> I've spent more hours than I'd like to admit trying to express the following
> scenario--

Another alternative would have been to specify:

location PlaceMySqlRightOnRight MySqlRight -inf: Left
location PlaceMySqlLeftOnLeft MySqlRight -inf: Right

which would have negated the need for:

property symmetric-cluster="false"

But neither is more correct than the other, glad you found something
that works for you.

>
> I have two servers, each with an installation of MySQL. The two MySQL's do
> master-master replication between eachother.
>
> I bind each of the two MySQL's to their own floating IP address, and clients 
> are
> configured to either use one or the other (ClusterIP is not an option because
> clients need to use the server that is closer to them when possible).
>
> Should MySQL on the left machine (for example) fail, the left floating IP is
> moved over to the right machine, and that now runs both floating IPs. The left
> MySQL resource should obviously *NOT* migrate over.
>
> As soon as MySQL on the left (for example) machine comes back up, the left
> floating IP needs to move off of the right machine back to the left machine.
>
> Effectively, by shuffling IPs around like this, I'd like to end up with 
> clients
> (almost) transparently failing over to another machine, and failing back as 
> soon
> as possible.
>
> Here's an abridged, annotated version of my attempted CRM configuration...
>
> -------------------------------------------------
>
> ###### 10.0.0.1
> node Left
>
> ###### 10.0.0.3
> node Right
>
> ###### A MySQL installation on node Left
> primitive MySqlLeft ocf:heartbeat:mysql \
>        meta target-role="Started"
>
> #### The IP address for applications which prefer MySqlLeft
> primitive MySqlLeftIP ocf:heartbeat:IPaddr2 \
>        params ip="10.0.0.2" meta target-role="Started"
>
> #### Require that MySqlLeft be run on Left, or not run at all
> location PlaceMySqlLeftOnLeft MySqlLeft inf: Left
>
> #### A MySQL installation on node Right
> primitive MySqlRight ocf:heartbeat:mysql \
>        meta target-role="Started"
>
> #### The IP address for applications which prefer MySqlRight
> primitive MySqlRightIP ocf:heartbeat:IPaddr2 \
>        params ip="10.0.0.4" meta target-role="Started"
>
> #### Require that MySqlRight be run on Right, or not run at all
> location PlaceMySqlRightOnRight MySqlRight inf: Right
>
> #### Start MySqlLeft, then start MySqlLeftIP, and don't stop MySqlLeftIP when
> #### MySqlLeft stops
> order LeftIPAfterMySqlLeft 0: MySqlLeft:start MySqlLeftIP:start
>
> #### Start MySqlRight, then start MySqlRightIP, and don't stop MySqlRightIP 
> when
> #### MySqlRight stops
> order RightIPAfterMySqlRight 0: MySqlRight:start MySqlRightIP:start
>
> #### I haven't been able to make many combinations of the following work... 
> ####
>
> #### Negative colocation... "the [left/right] IP should not be placed
> #### where the [left/right] MySQL instance is stopped"
> colocation LeftIPNotWhereLeftStopped -inf: \
>        MySqlLeftIP:Started MySqlLeft:Stopped
> colocation RightIPNotWhereRightStopped -inf: \
>        MySqlRightIP:Started MySqlRight:Stopped
>
> #### "opt-in" resource location... seems necessary to prevent MySqlLeft from
> #### running on Right and vice versa.
> property symmetric-cluster="false"
>
>
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to