Bug #58451 Can't stop starting nodes using ndb_mgm_stop()
Submitted: 24 Nov 2010 10:31 Modified: 30 Nov 2010 13:21
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[24 Nov 2010 10:31] Geert Vanderkelen
Description:
It's not possible to stop nodes while they are starting using ndb_mgm_stop() or ndb_mgm_stop2(.., abort=0). It only works when setting the abort argument to 1.

How to repeat:
MGM API code attached to bug report.

Start a data node and run the code multiple times (or in loop) while it is starting. In the code it is node ID 2 that is being stopped.
It doesn't work with ndb_mgm_stop() or ndb_mgm_stop2(abort=0)

(code not really working great due to bug #58319)

Suggested fix:
Either make sure we can stop starting nodes with both functions, or document that this is only working with ndb_mgm_stop2() with the argument abort set to 1 (meaning non-graceful shutdown).
[24 Nov 2010 10:41] Geert Vanderkelen
Verified using MySQL Cluster 7.1.9
[30 Nov 2010 9:44] 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/125462
[30 Nov 2010 10:01] 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/125468
[30 Nov 2010 10:10] Magnus Blåudd
Pushed a fix to 7.0.21 and 7.1.10 which allows the "force" flag for 'ndb_mgm_stop4' and 'ndb_mgm_restart4' to stop/restart nodes although some nodes are starting.
[30 Nov 2010 10:10] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.21 (revid:magnus.blaudd@oracle.com-20101130100052-j9ycjkielr3jl13o) (version source revid:magnus.blaudd@oracle.com-20101130100052-j9ycjkielr3jl13o) (merge vers: 5.1.51-ndb-7.0.21) (pib:23)
[30 Nov 2010 13:21] Jon Stephens
Documented as follows in the NDB-7.0.21 and 7.1.10 changelogs:

        It is now possible to stop or restart a node even while other
        nodes are starting, using the MGM API ndb_mgm_stop4() or
        ndb_mgm_restart4() function, respectively, with the force
        parameter set to 1.

Closed.