Mysql – All four data nodes in MySQL Cluster in same node group

mysql-clusterreplication

I am testing MySQL Cluster 7.2. I have two servers, mysql1 and mysql2. I want the management server and two data nodes to run on mysql1 and two other data nodes to run on mysql2. My config.ini file looks like this:

[ndb_mgmd]
hostname=mysql1
datadir=/var/mysql-cluster/ndb_data
NodeId=1

[ndbd default]
noofreplicas=2
datadir=/var/mysql-cluster/ndb_data
DataMemory=8M

[ndbd]
hostname=mysql1
NodeId=3

[ndbd]
hostname=mysql2
NodeId=4

[ndbd]
hostname=mysql1
NodeId=13

[ndbd]
hostname=mysql2
NodeId=14

[mysqld]
NodeId=50

With this configuration I would expect, as per the MySQL Cluster documentation, that the two data nodes 3 and 4 would be in nodegroup 0, while the two data nodes 13 and 14 would be in nodegroup 1.

However, when I start everything up and show the nodes, I see this:

Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     4 node(s)
id=3    @192.168.0.42  (mysql-5.5.30 ndb-7.2.12, starting, Nodegroup: 0, Master)
id=4    @192.168.0.43  (mysql-5.5.30 ndb-7.2.12, starting, Nodegroup: 0)
id=13   @192.168.0.42  (mysql-5.5.30 ndb-7.2.12, starting, Nodegroup: 0)
id=14   @192.168.0.43  (mysql-5.5.30 ndb-7.2.12, starting, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.0.42  (mysql-5.5.30 ndb-7.2.12)

[mysqld(API)]   1 node(s)
id=50 (not connected, accepting connect from any host)

Everything seems to be in nodegroup 0! What do I have to do to get 3 and 4 in one group and 13 and 14 in another?

Best Answer

This seems to be a bug [1] in MySQL. It happens because your data nodes are still starting. Node-group IDs should be shown correctly once they are started completely.

[1] http://bugs.mysql.com/bug.php?id=30831