Bug #41570 master_uuid discovery broken with master_host='localhost'
Submitted: 18 Dec 2008 0:17
Reporter: Darren Oldag
Status: Verified
Category:Monitoring: Agent Severity:S3 (Non-critical)
Version:2.0 OS:Any
Assigned to: Jan Kneschke Target Version:

[18 Dec 2008 0:17] Darren Oldag
Description:
I have a 5.1 slave pointing to a 5.0 master.  master_host='localhost' and
master_port=36001.  the 5.1 is running on 3306.

master_uuid is being returned as the uuid for the 5.1 mysqld.  i'm pretty sure this is
because the agent is using libmysql to connect to the master as specified by master.info,
and 'localhost' will let it connect to the unix domain socket instead of connecting to the
real master via tcp localhost:36001, as replication really would.

How to repeat:
see description

Suggested fix:
do not use libmysql 'feature' that connects to the unix domain socket by default for
'localhost' if we are trying to emulate the replication slave connecting to his master to
fetch the master uuid.
[18 Dec 2008 21:27] Gary Whizin
Fix with other master_uuid bugs. Leith thinks: just transform localhost --> 127.0.0.1 and
it will probably be fine...
[18 Dec 2008 23:56] Darren Oldag
changing to 127.0.0.1 for master_host fixed it for me, yes.
[16 Mar 15:45] Kay Roepke
As a note to the bugfixer: We automagically convert the "localhost" entry in the
agent-instance.ini to 127.0.0.1 to avoid using domain sockets.

Needs investigation.