Bug #57235 bind-address option in ndb connectstring does not work
Submitted: 5 Oct 2010 2:27 Modified: 13 May 2013 12:34
Reporter: John David Duncan Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:7.1.8 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[5 Oct 2010 2:27] John David Duncan
Description:
The documentation at http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-connectstring.html states that it is possible to supply a bind-address in the NDB connect string.   But this seems to have no effect for mysql nodes.

We have seen this problem on (at least) Solaris and FreeBSD.

How to repeat:
Start a management server and cluster data nodes. 

From another machine, start a mysql server.  In my case the my.cnf says:

------------------------------------------
[mysqld]
ndb-connectstring=christmas:1186;bind-address=10.9.14.1
ndbcluster
------------------------------------------

In the mysqld error log, we see: 
101004 19:14:10 [Note] NDB: NodeID is 4, management server 'christmas:1186'

But over at the management client, we find that this mysql server has connected from its default IP address, rather than the one specified  in the bind-address:

ndb_mgm> show
Cluster Configuration
[...]
[mysqld(API)]   4 node(s)
id=4    @10.7.5.8  (mysql-5.1.47 ndb-7.1.8)
[19 Sep 2011 9:37] Hartmut Holzgraefe
Still not working in 7.1.15a
[19 Oct 2011 6:53] Hartmut Holzgraefe
The bind-address in the connect string only defines the outgoing interface for connections to the management node.

The SHOW command does not show the point of view of the management node though, it shows the interface used to connect to the data nodes instead. And for these the default route seems to be used unless the interface address of both nodes are explicitly given in a [TCP] section in the config.ini file.

netstat shows that for mysqld -> management node connections the specified bind-address is used just fine as requested, it's just SHOW that has a different view of the world ...
[13 May 2013 12:34] Magnus Blåudd
Specifying bind-address in the --ndb-connectstring used when mysqld connects to the ndb_mgmd works fine according to latest comments.

Please note that output in the SHOW command is describing the peer name used for mysqld's connection to the cluster(the transporter connections) and since  mysqld is not connected directly to ndb_mgmd, it has to ask a connected ndbd which address mysqld used for connecting to the cluster. Furthermore those connections are not controlled by NDB_CONNECTSTRING but rather settings in config.ini