Bug #78342 mysqlrpladmin fails with complaint about unrelated GRANT during switchover
Submitted: 5 Sep 2015 20:53 Modified: 10 Feb 2017 5:39
Reporter: monty solomon Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Utilities Severity:S2 (Serious)
Version:1.5.4 OS:CentOS
Assigned to: CPU Architecture:Any

[5 Sep 2015 20:53] monty solomon
Description:
mysqlrpladmin refuses to run when it finds a GRANT for an unrelated user during switchover.

ERROR: Unable to parse grant statement GRANT REPLICATION SLAVE ON *.* TO 'SUSR_Repl_SSL'@'%' IDENTIFIED BY PASSWORD 'redacted' REQUIRE X509

The logs do not identify which server has the GRANT that it is complaining about.

mysqlrpladmin appears to be complaining about the the REQUIRE X509

How to repeat:
Add a replication user to the master that requires X509

GRANT REPLICATION SLAVE ON *.* TO 'SUSR_Repl_SSL'@'%' IDENTIFIED BY 'password' REQUIRE X509;

Execute mysqlrpladmin

$ mysqlrpladmin --verbose --demote-master --discover-slaves-login=.myrpladmin.cnf/[SUSR_rpladmin] --master=.myrpladmin.cnf/[lively-haze] --new-master=.myrpladmin.cnf[noisy-pond] --rpl-user=SUSR_Repl --log=mysqlrpladmin.log switchover

Get error

ERROR: Unable to parse grant statement GRANT REPLICATION SLAVE ON *.* TO 'SUSR_Repl_SSL'@'%' IDENTIFIED BY PASSWORD '*A6CD37844C838FC72EA6D957898712EF58FB36A5' REQUIRE X509
# Errors found. Switchover aborted.

Suggested fix:
1) Don't examine GRANTs for users unrelated to the task.

2) Understand REQUIRE X509 in GRANT

3) Update the logging to provide detail(s) about which server(s) have the reported problem(s).
[10 Feb 2017 5:39] Chiranjeevi Battula
Hello monty solomon,

Thank you for the bug report.
Verified based on internal discussion with dev's.

Thanks,
Chiranjeevi.