Bug #44866 dynamic ports no longer available in configuration
Submitted: 14 May 2009 9:17 Modified: 15 May 2009 15:00
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[14 May 2009 9:17] Magnus Blåudd
Description:
Dynamic ports will be used unless the port to use for each connection between processes in the cluster has been specified. When ndbd starts up and create connections to the other node it will use a dynamic port if the specified portnumber is 0 or negative.
 - If the value is 0, it will allocate any free port on the host and then report the portnumber it got back to ndb_mgmd so that other nodes can find out which port was used.
 - If the port is negative it indicates that the ndbd has been restarted and it will try to use that same portnumber again. If it fails to allocate that specific port, it will get any free and report that portnumber back to ndb_mgmd.

Starting from 7.0, the config returned from ndb_mgmd to ndbapi or ndbd does no longer contain the dynamic ports used for connecting to ndbd and this is a regression due to the introduction of ConfigManager.

How to repeat:
.

Suggested fix:
Make the dynamic port appear in the configuration again so that:
 - ndbd reuses old dynamic port number after restart
 - ndbapi client can directly connect to ndbd's dynamic ports without
   asking ndb_mgmd which port to use.
 

At the same time also remove the need to copy dynamic ports since that is a slow operation when running with a large configuration with many connections, see BUG#44488.
[14 May 2009 9:19] Magnus Blåudd
Dynamic ports are the default way of allocating connections between nodes in the cluster. Only in rare cases do you need to specify individual connections between nodes.
[14 May 2009 19:46] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/74103
[14 May 2009 20:08] Bugs System
Pushed into 5.1.34-ndb-7.0.6 (revid:magnus.blaudd@sun.com-20090514194749-5zeuy3cy5sy9ccrl) (version source revid:magnus.blaudd@sun.com-20090514194749-5zeuy3cy5sy9ccrl) (merge vers: 5.1.34-ndb-7.0.6) (pib:6)
[15 May 2009 15:00] Jon Stephens
Documented bugfix in the NDB-7.0.6 changelog as follows:

        When restarting, data nodes failed to re-use existing ports that
        had already been dynamically allocated for communications with
        management or API nodes.