Open GoogleCodeExporter opened 9 years ago
Use --ignore_fail_on_start , then it should work.
Document was incorrect, so I fixed the doc.
Original comment by Yoshinor...@gmail.com
on 17 Dec 2012 at 5:54
thanks!
Original comment by obric...@balakam.com
on 18 Dec 2012 at 6:51
the same situation and same conf
us1, us4 - alive. one of them is master
us3 - dead(slave)
i try change master manually
masterha_master_switch --master_state=alive --orig_master_is_new_slave
--conf=/home/mha4mysql/etc/app1.cnf --new_master_host=us1
Tue Dec 18 14:41:07 2012 - [info] MHA::MasterRotate version 0.55.
Tue Dec 18 14:41:07 2012 - [info] Starting online master switch..
Tue Dec 18 14:41:07 2012 - [info]
Tue Dec 18 14:41:07 2012 - [info] * Phase 1: Configuration Check Phase..
Tue Dec 18 14:41:07 2012 - [info]
Tue Dec 18 14:41:07 2012 - [warning] Global configuration file
/etc/masterha_default.cnf not found. Skipping.
Tue Dec 18 14:41:07 2012 - [info] Reading application default configurations
from /home/mha4mysql/etc/app1.cnf..
Tue Dec 18 14:41:07 2012 - [info] Reading server configurations from
/home/mha4mysql/etc/app1.cnf..
Tue Dec 18 14:41:07 2012 - [error][/usr/share/perl/5.14/MHA/MasterRotate.pm,
ln93] Switching master should not be started if one or more servers is down.
Tue Dec 18 14:41:07 2012 - [info] Dead Servers:
Tue Dec 18 14:41:07 2012 - [info] us3(172.16.50.13:3306)
Tue Dec 18 14:41:07 2012 - [error][/usr/share/perl/5.14/MHA/ManagerUtil.pm,
ln178] Got ERROR: at /usr/bin/masterha_master_switch line 53
could you add same option ignore_fail_on_start to masterha_master_switch? it'd
be usefull i think.
Sometimes it's needed to change master by some reason even if only 1 slave is
dead.
thanks in advance!
Original comment by obric...@balakam.com
on 18 Dec 2012 at 3:02
--master_state=alive is intended to be invoked manually (for scheduled master
switch) so if there is any dead slave I think you can easily remove from
configuration file (by editing manually or running "masterha_conf_host
--command=delete" command). As there are many workarounds, I'm not going to
support the feature. (I'm open to accept patches:).
Original comment by Yoshinor...@gmail.com
on 19 Dec 2012 at 3:54
This seemed to allow me to ignore broken or lagging replication with the
ignore_fail flag; I simply added this to
/usr/lib/perl5/vendor_perl/MHA/ServerManager.pm
in sub check_replication_health {
...
if ( $target->has_replication_problem($allow_delay_seconds) ) {
$log->error(" failed!");
## FAF
if( !$target->{ignore_fail} ) {
croak;
}
Original comment by freda...@gmail.com
on 27 Nov 2013 at 10:30
Original issue reported on code.google.com by
obric...@balakam.com
on 17 Dec 2012 at 11:05