tiup cluster reload

After modifying the cluster configuration, the cluster needs to be reloaded using the tiup cluster reload command for the configuration to take effect. This command publishes the configuration of the control machine to the remote machine where the service is running, and follows the upgrade process to restart the services in order according to the upgrade process. The cluster is still available during the restart process.

Syntax

tiup cluster reload <cluster-name> [flags]

<cluster-name>: the cluster name to operate on.

Options

--force

  • Ignores errors in the reloading process and forces reload.
  • Data type: BOOLEAN
  • Default: false

--transfer-timeout

  • When restarting PD or TiKV, the leader of the restarted node is migrated to other nodes first, and the migration process takes some time. You can set the maximum wait time (in seconds) by setting -transfer-timeout. After the timeout, the service can be restarted directly without waiting.
  • Data type: UINT
  • Default: 600

--ignore-config-check

  • After the binary files of components are deployed, the configurations of TiDB, TiKV, and PD components are checked using <binary> --config-check <config-file>. <binary> is the path of the deployed binary file. <config-file> is the configuration file generated based on the user configuration. If you want to skip this check, you can use this option.
  • Data type: BOOLEAN
  • Default: false

-N, --node

  • Specifies the nodes to be restarted. If not specified, all nodes are restarted. The value of this option is a comma-separated list of node IDs. You can get the node IDs from the first column of the cluster status table returned by the tiup cluster display command.
  • Data type: STRINGS
  • If this option is not specified in the command, all nodes are selected by default.

-R, --role

  • Specifies the roles to be restarted. If not specified, all roles are restarted. The value of this option is a comma-separated list of node roles. The role is the second column of the cluster status table.
  • Data type: STRINGS
  • If this option is not specified in the command, all roles are selected by default.

--skip-restart

The tiup cluster reload command performs two operations:

  • Refreshes all node configurations
  • Restarts the specified node

After you specify the --skip-restart option, it only refreshes the configuration without restarting any nodes, so that the refreshed configuration is not applied and does not take effect until the next restart of the corresponding service.

  • Data type: BOOLEAN
  • Default: false

-h, --help

  • Prints the help information.
  • Data type: BOOLEAN
  • Default: false

--pre-restart-script

  • Runs a script before the reload.
  • Data type: STRINGS
  • This option specifies the path of a script to be run on the node that is to be reloaded. It does not take effect when --skip-restart is set to true.

--post-restart-script

  • Runs a script after the reload.
  • Data type: STRINGS
  • This option specifies the path of a script to be run after the reload of a node. It does not take effect when --skip-restart is set to true.

Output

The execution log of the tiup-cluster.

<< Back to the previous page - TiUP Cluster command list