michealzh / mysql-master-ha

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

When doing SSH checks, SSH authentication availability should not be checked from those hosts which have no_master set to 1 #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a MHA config (/etc/mha_cluster_config) with some nodes specified with 
no_master=1
2. Run SSH check as follows: masterha_check_ssh --conf=/etc/mha_cluster_config
3. When you check the output of masterha_check_ssh you will see that it is 
trying to check SSH connection from those nodes as well which have no_master=1

What is the expected output? What do you see instead?
According to how MHA works, SSH connection originating from only those hosts 
are needed to work which ever have the possibility of becoming a master, 
because they need to transfer differential relay logs to other slaves. However, 
when a node is defined as no_master=1, we are specifically asking MHA to make 
sure that this particular node is never considered for a master role, and hence 
we do not need to check if nodes if no_master=1 can connect to other other 
hosts. I suggest that when MHA checks SSH connection it should only try to test 
to make sure that the candidate master nodes can connect to all the other nodes.

What version of the product are you using? On what operating system?
# rpm -qa | grep -i mha
mha4mysql-node-0.53-0.el6.noarch
mha4mysql-manager-0.53-0.el6.noarch

# uname -r
2.6.32-279.9.1.el6.x86_64

# cat /etc/redhat-release 
CentOS release 6.3 (Final)

Original issue reported on code.google.com by ovaista...@gmail.com on 19 Oct 2012 at 6:50

GoogleCodeExporter commented 8 years ago
If a slave with no_master=1 has the latest binlog events and other slaves do 
not have the latest events, MHA will try to send differential relay logs from 
the slave (with no_master=1) to other slaves via scp. So checking SSH 
connections from slaves with no_master=1 is needed.

Original comment by Yoshinor...@gmail.com on 19 Oct 2012 at 7:46

GoogleCodeExporter commented 8 years ago
Ok yes, thanks for the explanation

Original comment by ovaista...@gmail.com on 24 Oct 2012 at 11:51

GoogleCodeExporter commented 8 years ago

Original comment by Yoshinor...@gmail.com on 25 Oct 2012 at 4:09