Bug #58319 Getting status of nodes gives error after using ndb_mgm_stop()

Submitted: 19 Nov 2010 11:16 Modified: 26 Nov 2010 17:41
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S3 (Non-critical)
Version:mysql-5.1-ndb-7.1 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[19 Nov 2010 11:16] Geert Vanderkelen
Description:
It is not possible to get status of nodes after stopping a data node using ndb_mgm_stop(). It does work OK when using ndb_mgm_stop2( .. abort=1).

How to repeat:
C code reproducing the problem attached.

The output is:

// no = ndb_mgm_stop(handle, nonodes, nodes);
 Getting status
 Node ID: 1  sta tus:0
 Node ID: 2  status:4
 Node ID: 3  status:4
 Stopping data node
 Stopped 0 data node(s)
 Getting status
 Management server not connected (1010)

Note that the number of data nodes stopped is equal to 0. using ndb_mgm_stop(abort=0) gives the same result. But when use ndb_mgm_stop2(handle, nonodes, nodes, 1), the result is quite good:

// no = ndb_mgm_stop2(handle, nonodes, nodes, 1)
 Getting status
 Node ID: 1  status:0
 Node ID: 2  status:4
 Node ID: 3  status:4
 Stopping data node
 Stopped 1 data node(s)
 Getting status
 Node ID: 1  status:0
 Node ID: 2  status:1
 Node ID: 3  status:4

Suggested fix:
The return value for ndb_mgm_stop() is not correct, or it is incorrectly documented as returning the number of nodes stopped.
[19 Nov 2010 11:17] Geert Vanderkelen
Code to reproduce bug #58319

Attachment: bug58319.cc (, text), 1.76 KiB.

[19 Nov 2010 11:17] Geert Vanderkelen
Verified using MySQL Cluster 7.1.9
[26 Nov 2010 9:42] 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/125094
[26 Nov 2010 10:06] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.21 (revid:magnus.blaudd@oracle.com-20101126094541-ifyhbfiux8x51xjf) (version source revid:magnus.blaudd@oracle.com-20101126094541-ifyhbfiux8x51xjf) (merge vers: 5.1.51-ndb-7.0.21) (pib:23)
[26 Nov 2010 11:52] Magnus Blåudd
Pushed to: 
5.1.51-ndb-7.0.21
5.1.51-ndb-7.1.10
[26 Nov 2010 17:41] Jon Stephens
Documented bugfix in the NDB-7.0.21 and 7.1.10 changelogs as follows:

        It was not possible to obtain the status of nodes accurately
        after stopping a data node using ndb_mgm_stop().

Closed.
[29 Nov 2010 10:53] Jon Stephens
Amended changelog entry following discussion with Magnus, now reads:

        It was not possible to obtain the status of nodes accurately
        after an attempt to stop a data node using ndb_mgm_stop()  
        failed without returning an error.

Status unchanged.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.059 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.