Bug #70498 Topology discovery is anti-social
Submitted: 3 Oct 2013 6:18 Modified: 7 Oct 2013 19:10
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Enterprise Monitor: Configuration Severity:S3 (Non-critical)
Version:3.0.1.2893 OS:Any
Assigned to: CPU Architecture:Any
Tags: windmill

[3 Oct 2013 6:18] Simon Mudd
Description:
MEM 3 and earlier versions have a feature "topology discovery" which sounds really good. This tries to automatically determine the replication topology of the different servers.

However, it does this by "scraping the replication user credentials", and using that username to talk to the master and "find out stuff". That's really not very nice as during the install / setup there is no mention of this behaviour.
It's true that if you look at the dashboard configuration you can see this described but to "impersonate another user" with asking for that permission is really not well mannered behaviour.

How to repeat:
I noticed this as the agent logging showed that the replication user was unable to see information in mysql.inventory (I assume of the master's server). That's correct as the replication user has GRANT REPLICATION SLAVE rights so has no access to that information. (and doesn't need it to be a slave).

Suggested fix:
Thoughts:
1. provide a way to enable/disable this behaviour in the agent on installation.
2. if you need a user with such rights:
- ask if it's ok to determine this information
- ask for user credentials which can do this (provide the option if you want for backward compatibility to behave as you do now)
- make the error logging indicates that this error is not a local error message but an error message that is happening on the master.
[4 Oct 2013 8:07] Umesh Shastry
Hello Simon,

Thank you for the bug report.

Thanks,
Umesh
[7 Oct 2013 19:10] Simon Mudd
Also please provide an install option to enable this functionality to be turned off.

It was possible in MEM2 with this option

agent-master-uuid-discovery = 0

in etc/mysql-monitor-agent.ini, but that file no longer exists in MEM3.