5.6.6 The update process Command

update process [--remove-angel] --pid=os_pid process_id cluster_name

This command updates the status of the MySQL NDB Cluster process having the process ID process_id in the cluster named cluster_name when the status of the process is no longer reflected correctly in the output of the show status --process command. This typically happens in the following cases:

  • The process is a data node configured with StopOnError=true, so that it would not be automatically restarted by mcmd after it has stopped. Instead of using the start process command to restart the process, a user might have restarted the process manually, which would have restored the process but left mcmd without the knowledge of the restore. An update process is then needed to restore the control of the process by mcmd.

  • The process is a node that has been stopped by mcmd but, for some reasons, its PID remains valid with the operating system. In some cases, the process might even be running again, without mcmd knowing or being able to control it.

  • mcmd cannot connect to a mysqld node due to various reasons (for example, there are already too many connections to the node); process status for the node becomes failed, while the PID file continues to exist.

  • When a start process command for a mysqld node times out, mcmd looses control of the node. After fixing the issue on the mysqld node, run update process to restore control of the node by mcmd.

The command works by importing the process into the control of mcmd again. Checks performed on a process by mcmd during a cluster import are performed for the update process command. Both the process's ID in the cluster (process_id) and its PID on the operating system (specified with the --pid option) are required. Suppose that the process ID of a data node in the cluster named mycluster is 3 and its PID on the operating system is 9846, the data node can be updated as shown here:

mcm> update process --pid=9846 3 mycluster;
+------------------------------+
| Command result               |
+------------------------------+
| Process updated successfully |
+------------------------------+
1 row in set (33.07 sec)

For a data node or an SQL node, the command only works if there is at least 1 replica per nodegroup running.

update process supports a --remove-angel option, which should be used when updating data nodes: it kills any running angel process for a data node and updates its PID file prior to the actual update; those steps are necessary for the update process.

Note

Some options, when used to start an applicable NDB node, are not preserved after the update process:

. The same applies now to the