Bug #49781 Insufficient restart types for API nodes listed in ConfigInfo.cpp
Submitted: 17 Dec 2009 19:30 Modified: 4 Jan 2010 10:39
Reporter: Matthew Montgomery Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S4 (Feature request)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: 7.0.10

[17 Dec 2009 19:30] Matthew Montgomery
Description:
./storage/ndb/src/mgmsrv/ConfigInfo.cpp  Shows restart types of "default" or simply a Node restart for Hostname and ExecuteOnComputer changes on [API] nodes.

However just restarting the lone API node is not sufficient.  For either of these changes rolling restart of the ndb_mgmd and cluster ndb(mt)d nodes and that API node is required.  However there is no restart type defined to indicate that a rolling system restart is required in addition to the single node restart.

The current list of restart types  N, IN, S and IS do not sufficiently cover to all possible restart types.

How to repeat:
1776   /***************************************************************************
1777    * API
1778    ***************************************************************************/

1804   {
1805     CFG_NODE_HOST,
1806     "HostName",
1807     API_TOKEN,
1808     "Name of computer for this node",
1809     ConfigInfo::CI_USED,
1810     false,
1811     ConfigInfo::CI_STRING,
1812     "",
1813     0, 0 },

1850   {
1851     KEY_INTERNAL,
1852     "ExecuteOnComputer",
1853     API_TOKEN,
1854     "String referencing an earlier defined COMPUTER",
1855     ConfigInfo::CI_USED,
1856     false,
1857     ConfigInfo::CI_STRING,
1858     UNDEFINED,
1859     0, 0 },

Suggested fix:
Restart types should be defined and documented as follows:

 N : Node (Just this MGM, NDBD or API node)
IN : Initial Node (Just this MGM or NDBD node, wiping all data)
 S : System (All MGM then all NDBD nodes at the same time)
IS : Initial System (All MGM then all NDBD nodes at the same time, wiping all data)
RSN: Rolling System+Node (All MGM and NDBD nodes one after another and just this API node)
RSA: Rolling System+All API Nodes (All MGM and NDBD nodes one after another and all API nodes)

RSN type is needed when adding or moving API nodes in a live cluster.
RSA type is needed when adding (or moving?) NDBD nodes in a live cluster.

This additional clarity of this restart type can help management applications (MCM) make more appropriate restart type choices.  Also See: Bug #47366
[17 Dec 2009 19:35] MySQL Verification Team
RSA type is needed when adding (or moving?) MGM nodes in a live cluster also.
[18 Dec 2009 21:23] Magnus Blåudd
The restart type is defined in the comment for enum ConfigInfo::Flags in ConfigInfo.hpp and the default is as you see "node restart of one node at a time for the setting to take effect" and that means ALL(ndb_mgmd, ndbd and api) nodes.

We have identified a couple of parameters that if changed need initial or even initial system restart and have marked those appropriately. We currently have _no_ parameters that does not need any restart at all.

Sorry, but I must close this as not a bug.

"  
  enum Flags {
    CI_ONLINE_UPDATEABLE  = 1, // Parameter can be updated online
    CI_CHECK_WRITABLE = 2, // Path given by parameter should be writable

    /*
      Flags  telling how the system must be restarted for a changed
      parameter to take effect

      Default is none of these flags set, which means node restart
      of one node at a time for the setting to take effect

      CS_RESTART_INITIAL
      Each data node need to be restarted one at a time with --initial

      CS_RESTART_SYSTEM
      The whole system need to be stopped and then started up again

      CS_RESTART_SYSTEM + CS_RESTART_INITIAL
      The whole system need to be stopped and then restarted with --initial
      thus destroying any data in the cluster

      These flags can not be combined with CI_ONLINE_UPDATABLE flag which
      indicates that the parameter can be changed online without
      restarting anything
    */
    CI_RESTART_SYSTEM = 4, // System restart is necessary to apply setting
    CI_RESTART_INITIAL = 8 // Initial restart is necessary to apply setting
  };"
[4 Jan 2010 10:39] Jon Stephens
Anything changed in config.ini requires at a minimum a rolling restart of the cluster to take effect. This is the default. These facts are documented. Any change that happens or appears to work without performing at least a rolling restart does just that -- happens or appears to work -- and is not guaranteed behaviour.

Therefore, I'm closing this as !BUG as suggested by Magnus.
[8 Jan 2010 9:58] Jon Stephens
Furthermore:

It's not appropriate to have info not relating to Cluster parameters in the output of ndb_config. Info about MySQL server options should be obtained from `mysqld --help --verbose` (or by some other means from mysqld.cc). MCM should determine whether an attribute originates with config.ini or my.cnf. In the latter case, it should restart only the mysqld to which that my.cnf belongs.