Bug #43413 Node group not removed after "drop nodegroup"
Submitted: 5 Mar 2009 13:23 Modified: 14 Mar 2009 14:40
Reporter: Wen Xiong Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.4 OS:Solaris
Assigned to: Jonas Oreland CPU Architecture:Any

[5 Mar 2009 13:23] Wen Xiong
Description:
Node group is not removed after do ndb_mgm -e "drop nodegroup X" (X is the nodegroup ID) as expected.

This is the result of show command after drop nodegroup 1:
Connected to Management Server at: localhost:12500
Cluster Configuration
---------------------
[ndbd(NDB)]     4 node(s)
id=1    @127.0.0.1  (mysql-5.1.32 ndb-6.4.3, Nodegroup: 0, Master)
id=2    @127.0.0.1  (mysql-5.1.32 ndb-6.4.3, Nodegroup: 0)
id=40   @127.0.0.1  (mysql-5.1.32 ndb-6.4.3, Nodegroup: 1)
id=41   @127.0.0.1  (mysql-5.1.32 ndb-6.4.3, Nodegroup: 1)

[ndb_mgmd(MGM)] 1 node(s)
id=3    @127.0.0.1  (mysql-5.1.32 ndb-6.4.3)

[mysqld(API)]   14 node(s)
id=4    @127.0.0.1  (mysql-5.1.32 ndb-6.4.3)
id=5    @127.0.0.1  (mysql-5.1.32 ndb-6.4.3)
id=6    @127.0.0.1  (mysql-5.1.32 ndb-6.4.3)
id=7    @127.0.0.1  (mysql-5.1.32 ndb-6.4.3)
id=8    @127.0.0.1  (mysql-5.1.32 ndb-6.4.3)
id=9    @127.0.0.1  (mysql-5.1.32 ndb-6.4.3)
id=10 (not connected, accepting connect from localhost)
id=11 (not connected, accepting connect from localhost)
id=12 (not connected, accepting connect from localhost)
id=63 (not connected, accepting connect from localhost)
id=127 (not connected, accepting connect from localhost)
id=192 (not connected, accepting connect from localhost)
id=228 (not connected, accepting connect from localhost)
id=255 (not connected, accepting connect from localhost)

How to repeat:
1 Start a cluster with one ndb_mgmd and two ndbd
2 Add two ndbd and restart cluster with four ndbd nodes running, and create nodegroup for added nodes
3 ndb_mgm -e "drop nodegroup 1"
[5 Mar 2009 13:24] Jonas Oreland
could it be a "delay" in the updating of the status messages?
i.e if you wait a few seconds, does it still show the same thing ?
[5 Mar 2009 14:57] Wen Xiong
That does not help and the show command shows the same result.

One thing to mention: it has to ensure no data resides on nodes for which nodegroup we are going to drop.
[12 Mar 2009 17:47] Jonas Oreland
i just verified this
the problem is "only" that it does not show in ndb_mgmd
but it the node will report incorrectly until it's restarted...
[13 Mar 2009 9:39] 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/69114

2939 Jonas Oreland	2009-03-13
      ndb - bug#43413 - also inform ndbcntr about nodegroup being dropped, so that ndb_mgmd shows correct information
[13 Mar 2009 13:58] Bugs System
Pushed into 5.1.32-ndb-7.0.4 (revid:jonas@mysql.com-20090313131841-nvyxxfgyb8ej7wx7) (version source revid:jonas@mysql.com-20090313093819-pttmzzgzdaqubx0q) (merge vers: 5.1.32-ndb-7.0.4) (pib:6)
[14 Mar 2009 14:40] Jon Stephens
Documented bugfix in the NDB-7.0.4 changelog as follows:

        Following a DROP NODEGROUP command, the output of SHOW in the
        ndb_mgm cliently was not updated to reflect the fact that the
        data nodes affected by this command were no longer part of a
        node group.

In addition, the previously undocumented DROP NODEGROUP command is now documented in http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-mgm-client-commands.html and http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-online-add-node-remarks.html