Open GoogleCodeExporter opened 8 years ago
And of course I meant Pacemaker ;)
Original comment by m.je...@gmail.com
on 20 Sep 2012 at 12:36
If you code virtual IP failover logic inside a custom script and call it from
MHA by "master_ip_failover_script" parameter
(http://code.google.com/p/mysql-master-ha/wiki/Parameters#master_ip_failover_scr
ipt), you can do virual IP failover without using clustering software. I hear
some users/customers have written such logic.
> The document on
http://code.google.com/p/mysql-master-ha/wiki/Using_With_Clustering_Software
describes how to do that with a simple two node scenario but that wouldn't work
for me...
I think that works in your case as well. By managing master and slave1 via
Pacemaker, when master goes down you can do failover to slave1. MHA has
parameters so that it always try to failover to slave1 (See
http://code.google.com/p/mysql-master-ha/wiki/Parameters#candidate_master and
http://code.google.com/p/mysql-master-ha/wiki/Parameters#no_master). If both
master and slave1 go down at the same time, failover won't work, but in such
serious cases automated failover should not happen.
Original comment by Yoshinor...@gmail.com
on 21 Sep 2012 at 1:42
If I don't use clustering software I may end up with two servers having the
same IP address.
This can happen if someone pulls out the network cable from the master (by
accident), MHA will promote a different master and assign it the same IP.
With clustering the old master will detect that there is a new server in the
cluster and it will never reuse the virtual IP.
The thing is I have more than just one slave and I don't want to fail over to a
specific slave but to a slave which has the latest relay log events and this
can't be defined with priorities but has to be determined dynamically.
With the setup described in
http://code.google.com/p/mysql-master-ha/wiki/Using_With_Clustering_Software is
states specifically which server would be a preferred master and which will be
ignored.
I want this to work with masterha_manager which will decide which slave to fail
over to...
Original comment by m.je...@gmail.com
on 24 Sep 2012 at 10:03
> This can happen if someone pulls out the network cable from the master (by
accident), MHA will promote a different master and assign it the same IP.
In such scenario, I highly recommend to force shutdown the original master, or
doing nothing (do not start failover). Commands to force shutdown depend on
H/W. Some samples are under samples/scripts/ from MHA Manager tarball. By
shutting down the original master, you can avoid having two same IP address at
least.
I understand your request to promote the latest slave, not a specific slave. In
that case, implementing forcing shutdown logic and activating IP address logic
in MHA failover script
(http://code.google.com/p/mysql-master-ha/wiki/Parameters#master_ip_failover_scr
ipt) makes more sense to me. As described above, forcing shutdown logic highly
depends on H/W. Activating IP address logic can be borrowed from clustering
software.
Original comment by Yoshinor...@gmail.com
on 25 Sep 2012 at 10:37
Original issue reported on code.google.com by
m.je...@gmail.com
on 20 Sep 2012 at 12:32