fix master host which not include in hosts file will excute second… #88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…ary_check failed
we find something shold be better during checking masterha_secondary_check on MHA node.
command
secondary_check_script=masterha_secondary_check -s 172.17.16.245 -s 172.17.2.201 --port=60122 --user=mysql --master_host=xxx-db-0001 --master_ip=172.17.16.119 --master_port=3306
We find it will login remote (-s) host and excute perl scripts [ 'ssh_port $ssh_user_host 'perl -e xxxxx ' ] to check mysql status, But if you dont config master host in hosts file on every node, so remote monitor server could not find this host to ip, it will failed and return "Monitoring server $monitoring_server is reachable, Master is not writable from $monitoring_server. OK." , this leading to masterha_secondary_check return 2, and not failover.(use IO::Socket: xxx $master_host ) So if you change perl script master_host ----> master_ip , everthing is fine.
This is a very important detail, please seriously consider