priest671 / mysql-master-ha

Automatically exported from code.google.com/p/mysql-master-ha
0 stars 0 forks source link

Manual switching | alive Old master does't become new slave #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
While switching the master with " masterha_master_switch --master_state=alive 
--new_master_host=host2"

lets take host1 is old master and it is in alive state, host2 is new master ( 
which we wants to ). 

why this tool is not taking care of alive old master. As it is in alive state, 
why can't we switch this to new slave.

What are the possible cases that we will think about manual switching with 
alive master.

Original issue reported on code.google.com by jayaram2...@gmail.com on 20 Nov 2014 at 1:23

GoogleCodeExporter commented 9 years ago
Use --orig_master_is_new_slave .

Original comment by Yoshinor...@gmail.com on 20 Nov 2014 at 5:10

GoogleCodeExporter commented 9 years ago
Thanks for update, Its working as expected But, 

Facing problem with vip switching.
I'm using master_ip_online_change_script (sample script), as 
masterha_master_switch not taking master_ip_failover_script .

Is master_ip_online_change script for switching the vips ?

What is the role of master_ip_online_change.

I'm confusing about this. Please explain. I'm very eager to use mha in 
production servers 

Original comment by jayaram2...@gmail.com on 21 Nov 2014 at 10:56

GoogleCodeExporter commented 9 years ago
In your case, you are doing online master switch (not dead master failover) so 
use master_ip_online_change_script 
(https://code.google.com/p/mysql-master-ha/wiki/Parameters#master_ip_online_chan
ge_script). MHA calls an external script to do whatever you want. Rotating vip 
is one of the most common use cases. Since the way to change master's ip 
address depends on users' environment, MHA allows users to write any script 
here.

Original comment by Yoshinor...@gmail.com on 21 Nov 2014 at 9:06