Safe restart and shutdown of nodes
Stopping/restarting a YDB process on a node
To make sure that the process is stoppable, follow these steps.
Access the node via SSH.
Execute the command
kikimr cms request restart host {node_id} --user {user} --duration 60 --dry --reason 'some-reason'
If the process is stoppable, you’ll see
ALLOW
.Stop the process
sudo service kikimr stop
Restart the process if needed
sudo service kikimr start
Replacing equipment
Before replacing equipment, make sure that the YDB process is stoppable.
If the replacement is going to take a long time, first move all the VDisks from this node and wait until replication is complete.
After replication is complete, you can safely shut down the node.
To make sure that disabling the dynamic node doesn’t affect query handling, drain the tablets from this node first.
Go to the Hive web-viewer page.
Click “View Nodes” to see a list of all nodes.
Before disabling the node, first disable the transfer of tablets through the Active button, then click Drain, and wait for all the tablets to be moved away.