login-path is positional

Bug #1503147 reported by Jervin R
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Monitoring Plugins
Fix Released
Medium
Unassigned

Bug Description

Seems the login-path mysql client option has become positional and broke https://bugs.launchpad.net/percona-monitoring-plugins/+bug/1338549

With unpatched plugins:

[root@sphinx1 plugins]# sudo -u nagios -H /usr/lib64/nagios/plugins/pmp-check-mysql-processlist -L rds -H xxxxxxxxxx.us-east-1.rds.amazonaws.com
mysql: unknown variable 'login-path=rds'
UNK could not retrieve MySQL processlist

With the patch:

[root@sphinx1 plugins]# diff pmp-check-mysql-processlist pmp-check-mysql-processlist.0
174c174
< mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} ${OPT_LOPA:+--login-path="${OPT_LOPA}"} ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_USER:+-u"${OPT_USER}"} \
---
> mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} ${OPT_HOST:+-h"${OPT_HOST}"} ${OPT_USER:+-u"${OPT_USER}"} \
176c176
< -ss -e "$1"
---
> ${OPT_LOPA:+--login-path="${OPT_LOPA}"} -ss -e "$1"
[root@sphinx1 plugins]#

[root@sphinx1 plugins]# sudo -u nagios -H /usr/lib64/nagios/plugins/pmp-check-mysql-processlist -L rds -H xxxxxxxxxx.us-east-1.rds.amazonaws.com
OK 0 unauthenticated, 0 locked, 0 copy to table, 0 statistics | processes=0;16;32;0;

Revision history for this message
Roman Vynar (roman-vynar) wrote :

Thanks Jervin.

The problem is described by Sveta here https://bugs.mysql.com/bug.php?id=70856

--login-path option should be specified before other credential options if they are given.
Using --login-path alone works fine.
So I moved it.

Changed in percona-monitoring-plugins:
status: New → Fix Committed
importance: Undecided → Medium
Changed in percona-monitoring-plugins:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.