Bug #12124 ndb_mgm -e "# stop" does not allow stopping ndb_mgmd processes on other systems
Submitted: 22 Jul 2005 20:58 Modified: 20 Jan 2006 14:50
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.0, 5.1 OS:Linux (Linux)
Assigned to: Stewart Smith CPU Architecture:Any

[22 Jul 2005 20:58] Jonathan Miller
Description:
Using ndb_mgm -c host:port -e "# stop" only works for the ndb_mgmd processes on current system.

A cluster with more then 1 ndb-mgmd will allow a "# stop" where # == to the ndb_mgmd id number of the one running on the current system.
ndb08:~/jmiller> ndb_mgm $ndbc --execute="1 stop"
Connected to Management Server at: ndb08:14000
Node 1 has shutdown.

But try the same command for the one running on a different systems and you get:

@ndb07 run]$ ndb_mgm ndb07:14000 -e "2 stop"
Connected to Management Server at: ndb07:14000
Shutdown failed.
*  2002: Stop failed
*        The process has wrong type. Expected a DB process.

Yet you are still able to stop the one running on that  system

ndb07 run]$ ndb_mgm ndb07:14000 -e "3 stop"
Connected to Management Server at: ndb07:14000
Node 3 has shutdown.
-----------------------------------
[ndb_mgmd]
Id: 1
HostName: ndb08
ArbitrationRank: 1

[ndb_mgmd]
Id: 2
HostName: ndb09
ArbitrationRank: 1

[ndb_mgmd]
Id: 3
HostName: ndb07
ArbitrationRank: 1

How to repeat:
setup 3 computers each with ndb_mgmd processes that point to the same cluster.
Using the ndb_mgm client try and stop ndb_mgmd processes in the cluster that are on different systems. Try and stop the local ndb_mgmd processes

Suggested fix:
If a ndb_mgmd process belongs to a given cluster, you should be able to stop it from any of the ndb_mgmd processes.
[24 Jul 2005 3:10] Stewart Smith
My proposed way to solve WL2703 (restart for ndb_mgmd) should allow for this bug to be fixed easily.
[14 Sep 2005 23:13] Jonathan Miller
Just a reminder that I am still hitting this issue.
[16 Jan 2006 13:12] 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/1137
[19 Jan 2006 10:32] Stewart Smith
pushed to 5.0.19

many unmerged csets to 5.1, won't attempt merging yet
[20 Jan 2006 14:50] 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 bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented in 5.0.19 changelog. Closed.