mha4mysql-node icon indicating copy to clipboard operation
mha4mysql-node copied to clipboard

NodeUtil.pm: slight bug on version extraction

Open geekgogie opened this issue 5 years ago • 0 comments

Caused by an error as an example: vagrant@node_manager:~$ /usr/local/bin/masterha_check_repl --conf=/etc/app1.cnf Fri May 3 00:59:43 2019 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping. Fri May 3 00:59:43 2019 - [info] Reading application default configuration from /etc/app1.cnf.. Fri May 3 00:59:43 2019 - [info] Reading server configuration from /etc/app1.cnf.. Fri May 3 00:59:43 2019 - [info] MHA::MasterMonitor version 0.58. Fri May 3 00:59:44 2019 - [error][/usr/local/share/perl/5.26.1/MHA/MasterMonitor.pm, ln427] Error happened on checking configurations. Redundant argument in sprintf at /usr/local/share/perl/5.26.1/MHA/NodeUtil.pm line 195. Fri May 3 00:59:44 2019 - [error][/usr/local/share/perl/5.26.1/MHA/MasterMonitor.pm, ln525] Error happened on monitoring servers. Fri May 3 00:59:44 2019 - [info] Got exit code 1 (Not master dead).

It would be more readable and easy to follow using array and then splice based only on the indexes needed to be parsed in Major and Minor version

geekgogie avatar May 03 '19 02:05 geekgogie