Debian Codegraph @

mysql-test/suite/ndb/include/restart_cluster_rolling.inc

raw
1 ##
2 ## Restarts a NDB cluster by rolling node restart
3 ##
4 ## Parameters:
5 ## $waiter_timeout_start - How long wo tait for a single node to start, default from restart_node.inc
6 ## $waiter_timeout_stop - How long to wait for a single node to stop, default from restart_node.inc
7 ## $MTR_NDB_FIRST_NDBD_NODEID - The first node id of the NDBD data nodes
8 ## $MTR_NDB_LAST_NDBD_NODEID - The last node id of the NDBD data nodes
9 ##
10 ## This include file has as a prerequisite that the NDBD node ids is in a numbered range without
11 ## holes which starts with MTR_NDB_FIRST_NDBD_NODEID and ends with $MTR_NDB_LAST_NDBD_NODEID.
12 ##
13 ## The last two parameters are normally provided by
14 ## --source suite/ndb/include/ndb_info.inc
15 ##
16
17 --echo # Rolling system restart from node $MTR_NDB_FIRST_NDBD_NODEID to node $MTR_NDB_LAST_NDBD_NODEID:
18 --append_file $NDB_TOOLS_OUTPUT
19 # Rolling system restart:
20 EOF
21
22 --let $ndb_node_id= $MTR_NDB_LAST_NDBD_NODEID
23 while (`SELECT $ndb_node_id >= $MTR_NDB_FIRST_NDBD_NODEID`) {
24 --echo # Restarting node $ndb_node_id as part of rolling system restart
25 --source suite/ndb/include/restart_node.inc
26 --dec $ndb_node_id
27 }
28 --let $ndb_node_id=
29 --exec $NDB_MGM -e "show" >> $NDB_TOOLS_OUTPUT