Bug #21715 mgm client command <id|all> STATUS returns "not connected" for non-data nodes
Submitted: 18 Aug 2006 10:49 Modified: 28 Mar 2007 2:45
Reporter: Roland Bouman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:4.1, 5.0, 5.1.11 beta OS:Linux (Ubuntu 6 (Linux 2.6.15))
Assigned to: Guangbao Ni CPU Architecture:Any
Tags: cluster, Management client, NDB_MGM, STATUS

[18 Aug 2006 10:49] Roland Bouman
Description:
The <id> STATUS command is a management client command that is supposed to return status information concerning the data node identified by the node id that precedes that STATUS keyword.

When the command is applied to a non-data node, the message 

"Node <id>: not connected"

is returned. This is at best confusing, because the node with that id is in fact connected; it's just not a data node (but a management node or sql node)

Note that using an invalid node id does return a useful message. ("<id>: Node not found")

How to repeat:
Start a minimal cluster, and connect the management client:

ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @127.0.0.1  (Version: 5.1.11, Nodegroup: 0, Master)
id=3    @127.0.0.1  (Version: 5.1.11, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @127.0.0.1  (Version: 5.1.11)

[mysqld(API)]   1 node(s)
id=4    @127.0.0.1  (Version: 5.1.11)

ndb_mgm> 2 Status
Node 2: started (Version 5.1.11)

ndb_mgm> 4 Status
Node 4: not connected

ndb_mgm> 1 Status
Node 1: not connected

ndb_mgm> 10 Status
10: Node not found
 

Suggested fix:
Please modify the message so that it indicates that an id of a data node was expected. Something similar is already implemented for the <id> STOP command:

ndb_mgm> 4 stop
Shutdown failed.
*  2002: Stop failed
*        The process has wrong type. Expected a DB process.
[18 Aug 2006 11:50] MySQL Verification Team
Updating Category to Cluster.
[16 Nov 2006 3:28] 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/15393

ChangeSet@1.2538, 2006-11-16 11:29:35+08:00, gni@dev3-127.(none) +1 -0
  BUG#21715  mgm client command <id|all> STATUS returns "not connected" for non-data nodes
[29 Nov 2006 2:32] 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/16058

ChangeSet@1.2538, 2006-11-29 10:34:09+08:00, gni@dev3-127.(none) +1 -0
  BUG#21715  mgm client command <id|all> STATUS returns "not connected" for non-data nodes
[6 Dec 2006 4:00] 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/16488

ChangeSet@1.2538, 2006-12-06 12:01:19+08:00, gni@dev3-221.dev.cn.tlan +1 -0
  BUG#21715  mgm client command <id|all> STATUS returns "not connected" for non-data nodes
[13 Dec 2006 8:11] Guangbao Ni
Approved by stewart
[15 Dec 2006 1:26] Guangbao Ni
Approved by stewart and merged into ndb-bj trees of version 4.1.23, 5.0.25 and 5.1.14.
[7 Feb 2007 17:04] Tomas Ulin
pushed to 5.1.16
[7 Feb 2007 23:53] Tomas Ulin
pushed to 5.0.36
[7 Feb 2007 23:56] Tomas Ulin
pushed to 4.1.23
[8 Feb 2007 4:56] Jon Stephens
Sorry, but this isn't much of a fix IMO:

jon@gigan:/usr/local/mysql> bin/ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     4 node(s)
id=1    @192.168.0.103  (Version: 5.1.16, Nodegroup: 0, Master)
id=2    @192.168.0.176  (Version: 5.1.16, Nodegroup: 0)
id=3    @192.168.0.103  (Version: 5.1.16, Nodegroup: 1)
id=4    @192.168.0.176  (Version: 5.1.16, Nodegroup: 1)

[ndb_mgmd(MGM)] 2 node(s)
id=5    @192.168.0.103  (Version: 5.1.16)
id=6    @192.168.0.176  (Version: 5.1.16)

[mysqld(API)]   4 node(s)
id=7    @192.168.0.103  (Version: 5.1.16)
id=8 (not connected, accepting connect from any host)
id=9 (not connected, accepting connect from any host)
id=10 (not connected, accepting connect from any host)

ndb_mgm> 1 status
Node 1: started (Version 5.1.16)

ndb_mgm> 5 status
Node 5: connected (Version 0.0.0)

ndb_mgm> 7 status
Node 7: connected (Version 0.0.0)

I'm reopening this bug. Please make the command display a correct version string instead of "(Version 0.0.0)".

Thanks.
[8 Feb 2007 6:29] 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/19534

ChangeSet@1.2564, 2007-02-08 14:29:33+08:00, gni@dev3-221.dev.cn.tlan +1 -0
  BUG#21715 mgm client command <id|all> STATUS return "version(0.0.0.0)" for non-data nodes
[12 Feb 2007 5:33] Stewart Smith
looks good.
[15 Feb 2007 8:56] 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/19927

ChangeSet@1.2607, 2007-02-15 16:52:23+08:00, gni@dev3-221.dev.cn.tlan +1 -0
  BUG#21715 mgm client command <id> status return version(0.0.0.0)
[15 Feb 2007 10:31] Guangbao Ni
push into mysql-4.1-ndb-bj, mysql-5.0-ndb-bj and mysql-5.1-new-ndb-bj
[23 Mar 2007 2:15] Jon Stephens
Questions:

1. ALL STATUS still doesn't display information for management or API nodes. Is this the intended behaviour?

2. Is this to be fixed in 4.1 also? There's a 4.1 push indicated but no 4.1 version number.

Thanks!
[26 Mar 2007 1:31] Guangbao Ni
Hello Jon,

Answers:
   1.yes, ALL STATUS only display the information of data nodes. 

   2.It is fixed in 4.1.I have pushed into mysql-4.1-ndb-bj, but i find it hasn't been merged into 4.1-ndb and its main tree until now.
[28 Mar 2007 2:45] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented fix in 4.1.23, 5.0.40, and 5.1.17 changelogs.
[9 May 2007 3:23] Guangbao Ni
merge into mysql-4.1-ndb
[10 May 2007 12:56] Bugs System
Pushed into 4.1.23