Bug #33459 Management server node doesn't play nice with long hostnames
Submitted: 21 Dec 2007 14:56
Reporter: Geert Vanderkelen Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1 OS:Any
Assigned to: CPU Architecture:Any

[21 Dec 2007 14:56] Geert Vanderkelen
Description:
When using hostnames in the configuration of Cluster, the management client will 'cut off' the names when outputting using SHOW.

 [ndbd(NDB)]     2 node(s)
 id=3 (not connected, accepting connect from cent01.kemuri.net)
 id=4 (not connected, accepting connect from cent02.kemuri.net)

 [ndb_mgmd(MGM)] 2 node(s)
 id=1    @cent01.kemuri.ne  (mysql-5.1.22 ndb-6.3.6)
 id=2 (not connected, accepting connect from cent02.kemuri.net)

This ain't that of a big problem, just looks odd and gives false information.

How to repeat:
Use a long hostname (size > 15 chars) and use SHOW in the ndb_mgm client.

Suggested fix:
Thanks to Hartmut to find the right piece of code. It looks a bit odd:

include/mgmapi/mgmapi.h

struct ndb_mgm_node_state {
  // ..
    char connect_address[
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
                         sizeof("000.000.000.000")+1
#endif
 // ..

Maybe make the length a tiny bit smarter? :)
[21 Dec 2007 15:01] Geert Vanderkelen
Workaround is of course to use hostnames which fit the 15 bytes length. Usually IP addresses are used for the Hostname in the configuration of Cluster.