Bug #70352 MySQL Cluster auto-installer assigns Node IDs already in use
Submitted: 16 Sep 2013 13:03 Modified: 29 Sep 2013 14:45
Reporter: Victor Hahn Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Packaging Severity:S3 (Non-critical)
Version:MySQL Cluster 7.3.2 OS:Linux
Assigned to: CPU Architecture:Any

[16 Sep 2013 13:03] Victor Hahn
Description:
After installing the current generic linux package of MySQL Cluster to /opt/mysql-cluster, automatic configuration using ndb_setup.py fails. A minimum of custom options was used. MySQL cluster was already installed previously, but its installation directory was wiped.

The step "Deplay & start cluster" fails with the following error message:

Command '[u'/opt/mysql-cluster/bin/ndbmtd', '--ndb-nodeid=1', '--ndb-connectstring=127.0.0.1:1186,']' returned non-zero exit status 1

ndb_setup.py was started using the following command and printed the following messages to stdout:

mysql@host1:~/bin$ ./ndb_setup.py -n -N 10.0.1.137
Running out of install dir: /opt/mysql-cluster/bin
Starting web server on port 8081
deathkey=980624
Navigate to http://10.0.1.137:8081/welcome.html to launch the application.

How to repeat:
Install MySQL cluster, wipe it, install it again, run auto installer.

Suggested fix:
Make the auto-installer not assign occupied node IDs.
[16 Sep 2013 13:04] Victor Hahn
Log file

Attachment: log.txt (text/plain), 9.11 KiB.

[29 Sep 2013 14:45] MySQL Verification Team
Hello Victor,

Thank you for the bug report.
Verified as described.

I observed that this issue is repeatable when you have already a cluster setup up and running and using the node id's 1,2.. for data nodes.. and then if you try to invoke ndb_setup.py and go for "deploy & start cluster" option..

// setup used mysql-cluster-com-7.3.2

ushastry@ushastry:~/MySQL_Cluster$ more /tmp/ndb_setup-10282.log
2013-09-29 20:05:05,861: ERROR [exec_cmdv;clusterhost.py:479]: output=2013-09-29 20:04:35 [ndbd] INFO     -- Angel connected to '127.0.0.1:1186'
2013-09-29 20:05:05 [ndbd] ERROR    -- Failed to allocate nodeid, error: 'Error: Could not alloc node id at 127.0.0.1 port 1186: Id 1 already allocated
 by another node.'
 
2013-09-29 20:05:05,862: ERROR [do_POST;request_handler.py:428]: POST request failed: 
Traceback (most recent call last):
  File "/home/ushastry/mybuild/mysql-cluster-com-7.3.2/share/mcc/request_handler.py", line 423, in do_POST
    rep = handle_req(msg)
  File "/home/ushastry/mybuild/mysql-cluster-com-7.3.2/share/mcc/request_handler.py", line 101, in handle_req
    return h(req, req['body'])
  File "/home/ushastry/mybuild/mysql-cluster-com-7.3.2/share/mcc/request_handler.py", line 191, in handle_startClusterReq
    map(lambda pg: start_pgroup(pg, body), body['pgroups'])
  File "/home/ushastry/mybuild/mysql-cluster-com-7.3.2/share/mcc/request_handler.py", line 191, in <lambda>
    map(lambda pg: start_pgroup(pg, body), body['pgroups'])
  File "/home/ushastry/mybuild/mysql-cluster-com-7.3.2/share/mcc/request_handler.py", line 178, in start_pgroup
    map(lambda p: start_proc(p,body), pgroup['plist'])
  File "/home/ushastry/mybuild/mysql-cluster-com-7.3.2/share/mcc/request_handler.py", line 178, in <lambda>
    map(lambda p: start_proc(p,body), pgroup['plist'])
  File "/home/ushastry/mybuild/mysql-cluster-com-7.3.2/share/mcc/request_handler.py", line 165, in start_proc
    ch.exec_cmdv(util.params_to_cmdv(executable, params), pc, stdinFile)
  File "/home/ushastry/mybuild/mysql-cluster-com-7.3.2/share/mcc/clusterhost.py", line 476, in exec_cmdv
    subprocess.check_call(cmdv, stdin=stdin, stdout=output, stderr=output)
  File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '[u'/home/ushastry/mybuild/mysql-cluster-com-7.3.2/bin/ndbmtd', '--ndb-nodeid=1', '--ndb-connectstring=127.0.0.1:1186,']' r
eturned non-zero exit status 1
[4 Oct 2016 23:45] Michael Seydel
Is this still broken? I appear to be blocked by it now. Is there a workaround?