Bug #61607 ndb_mgmd incorrectly reports failure when there are no ndbds to stop
Submitted: 23 Jun 2011 11:55 Modified: 27 Jun 2011 8:25
Reporter: Gunn Olaussen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:7.1 revno 4252 OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[23 Jun 2011 11:55] Gunn Olaussen
Description:
Sending a shutdown to the ndb_mgmd while the ndbd are stopped/failed etc. fails. Before revision 4248 the ndb_mgmd returned success, but now it fails. Have reproduced this manually by simply calling shutdown through ndb_mgmd before starting the rest of the nodes:

SETUP:
**************************************************************************
khepri03$ ./ndb_mgmd --nodaemon=TRUE --ndb-nodeid=1 --config-file=/tmp/config.ini --configdir=/tmp/cluster/mgmd_cfg --config-cache=FALSE

khepri03$ cat /tmp/config.ini
[NDBD]
NodeId=3
DataDir=/tmp/cluster/ndbd_data3
HostName=khepri03

[NDBD]
NodeId=2
DataDir=/tmp/cluster/ndbd_data2
HostName=khepri03

[MYSQLD]
NodeId=4
HostName=khepri03

[NDB_MGMD]
PortNumber=19501
NodeId=1
DataDir=/tmp/cluster/mgmd_data
HostName=khepri03
**************************************************************************

WITH CLUSTER 7.1 - revno 4252:
**************************************************************************
khepri03$ ./ndb_mgm -c khepri03:19501
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: khepri03:19501
Cluster Configuration
---------------------
[ndbd(NDB)]    2 node(s)
id=2 (not connected, accepting connect from khepri03)
id=3 (not connected, accepting connect from khepri03)

[ndb_mgmd(MGM)]    1 node(s)
id=1    @129.159.112.192  (mysql-5.1.56 ndb-7.1.15)

[mysqld(API)]    1 node(s)
id=4 (not connected, accepting connect from khepri03)

ndb_mgm> shutdown
Shutdown of NDB Cluster node(s) failed.
*  2002: Stop failed
*        Send to process or receive failed.: Permanent error: Application error
**************************************************************************

WITH CLUSTER 7.2.0 / 7.1.10:
**************************************************************************
khepri03$ ./ndb_mgm -c khepri03:19501
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: khepri03:19501
Cluster Configuration
---------------------
[ndbd(NDB)]    2 node(s)
id=2 (not connected, accepting connect from khepri03)
id=3 (not connected, accepting connect from khepri03)

[ndb_mgmd(MGM)]    1 node(s)
id=1    @khepri03  (mysql-5.1.51 ndb-7.2.0)

[mysqld(API)]    1 node(s)
id=4 (not connected, accepting connect from khepri03)

ndb_mgm> shutdown
0 NDB Cluster node(s) have shutdown.
Disconnecting to allow management server to shutdown.
**************************************************************************

How to repeat:
See suggested config and commands in the description
[27 Jun 2011 6:35] Jonas Oreland
pushed to 7.0.26 and 7.1.15
[27 Jun 2011 6:40] Jonas Oreland
this is a regression introduced in 7.0.24, 7.1.13
[27 Jun 2011 8:25] Jon Stephens
Documented in the NDB 7.0.26 and 7.1.15 changelogs as follows:

        It was not possible to shut down a management node while one or
        more data nodes were stopped (for whatever reason). This issue
        was a regression introduced in MySQL Cluster NDB 7.0.24 and
        MySQL Cluster NDB 7.1.13.

Closed.