yoshinorim / mha4mysql-manager

Development tree of Master High Availability Manager and tools for MySQL (MHA), Manager part
http://code.google.com/p/mysql-master-ha/
GNU General Public License v2.0
1.46k stars 501 forks source link

ssh check failed if manager node deployed on a backup slave server #153

Open leafgray opened 2 years ago

leafgray commented 2 years ago

Maybe it is not recommend / typical usage. My simple environment: hostA (master) hostB (backup master) hostC (slave for backup) . Used as manager node.

host A/B/C can ssh login with each other use key.... but ssh_check failed,after some debug, I found it's caused by hostC can't ssh to hostC. relate code(SSHCheck.pm line 107): my $command = 108 "ssh $MHA::ManagerConst::SSH_OPT_CHECK -p $src->{ssh_port} $src->{ssh_user}\@$src->{ssh_ip} \"ssh $MHA::ManagerConst::SSH_OPT_ CHECK -p $dst->{ssh_port} $dst->{ssh_user}\@$dst->{ssh_ip} exit 0\""

add hostC pub key to self authorized_keys, then it works.

I don't know perl too much, there is a way to skip this situation? or a document improvement should be ok....

Thanks.