Bug #47377 Giving nodes explicit names not using DNS names or IP addr
Submitted: 16 Sep 2009 14:36
Reporter: Geert Vanderkelen Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S4 (Feature request)
Version:mysql-5.1-telco-6.2 OS:Any
Assigned to: CPU Architecture:Any

[16 Sep 2009 14:36] Geert Vanderkelen
Description:
Maybe it would be nice to have explicit names for nodes in a MySQL Cluster which are not bound to DNS look ups.
A use case would be for example when running multiple ndbd processes on the same box. In the SHOW output, they would have all the same IP address, but with a name you can have some thing like:

[ndbd(NDB)]     2 node(s)
id=3    Master_DN_1  (mysql-5.1.35 ndb-6.3.26, Nodegroup: 0, Master)
id=4    Master_DN_2  (mysql-5.1.35 ndb-6.3.26, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    Master_MGM_1  (mysql-5.1.35 ndb-6.3.26)

Of course, there is always the 'id' that can be used, but we've seen that lots of folks are actually giving different names to these boxes/processes.
Advantage also is that the name will not change when DNS is changed.

I would go even further and give the Cluster itself a name.

Just an idea.

How to repeat:
(feature request)

Suggested fix:
[NDB_MGMD DEFAULT]
ClusterName=MasterCluster

[NDBD]
Id=3
NodeName=Master_Box_A

[NDBD]
Id=4
NodeName=Master_Box_B

[NDB_MGMD]
Id=1
NodeName=Master_Box_C

(I thought giving default names, but that would break compatibility.)

Example SHOW output:

Cluster Configuration: MasterCluster
---------------------
[ndbd(NDB)]     2 node(s)
id=3    Master_Box_A  (mysql-5.1.35 ndb-6.3.26, Nodegroup: 0, Master)
id=4    Master_Box_B  (mysql-5.1.35 ndb-6.3.26, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    Master_Box_C  (mysql-5.1.35 ndb-6.3.26)

[mysqld(API)]   8 node(s)
id=10   @mysqlserv1-dns  (mysql-5.1.35 ndb-6.3.26)

Note:
* Defaulting to IP address: @10.100.9.9
* When Hostname: @ndbsup-priv-1   (also with @ prefixed, to denote DNS)
* Nodename: Master_Box_A (without @)