Skip to content

Commit 513df1c

Browse files
Joyinqinti-srebot
authored andcommitted
cherry pick #5308 to release-5.0
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
1 parent 5a76acf commit 513df1c

File tree

4 files changed

+184
-0
lines changed

4 files changed

+184
-0
lines changed

tiup/tiup-component-dm-prune.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: tiup dm prune
3+
---
4+
5+
# tiup dm prune
6+
7+
When you scale in the cluster(/tiup/tiup-component-dm-scale-in.md), a small amount of metadata in etcd is not cleaned up, which usually causes no problem. If you need to clean up the metadata, you can manually execute the `tiup dm prune` command.
8+
9+
## Syntax
10+
11+
```shell
12+
tiup dm prune <cluster-name> [flags]
13+
```
14+
15+
## Option
16+
17+
### -h, --help
18+
19+
- Prints the help information.
20+
- Data type: `BOOLEAN`
21+
- Default: false
22+
23+
## Output
24+
25+
The log of the cleanup process.

tiup/tiup-component-dm-reload.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: tiup dm reload
3+
---
4+
5+
# tiup dm reload
6+
7+
After [modifying the cluster configuration]<!-- (/tiup/tiup-component-dm-edit-config.md) -->, the cluster needs to be reloaded using the `tiup dm 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 restarts the service in order according to the upgrade process. The cluster remains available during the restart process.
8+
9+
## Syntax
10+
11+
```shell
12+
tiup dm reload <cluster-name> [flags]
13+
```
14+
15+
`<cluster-name>`: the name of the cluster to operate on.
16+
17+
## Options
18+
19+
### -N, --node
20+
21+
- 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. The node ID is the first column of the [cluster status]<!--(/tiup/tiup-component-dm-display.md) -->table.
22+
- Data type: `strings`
23+
- Default: `[]`, which means all nodes are selected.
24+
25+
> **Note:**
26+
>
27+
> + If the `-R, --role` option is specified at the same time, then the service status in their intersection is restarted.
28+
> + If the `--skip-restart` option is specified, the `-N, --node` option is invalid.
29+
30+
### -R, --role
31+
32+
- 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]<!-- (/tiup/tiup-component-dm-display.md) -->table.
33+
- Data type: `strings`
34+
- Default: `[]`, which means all roles are selected.
35+
36+
> **Note:**
37+
>
38+
> + If the `-N, --node` option is specified at the same time, the services in their intersection is restarted.
39+
> + If the `--skip-restart` option is specified, the `-R, --role` option is invalid.
40+
41+
### --skip-restart
42+
43+
The `tiup dm reload` command performs two operations:
44+
45+
- Refreshes all node configurations
46+
- Restarts the specified node
47+
48+
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.
49+
50+
- Data type: `BOOLEAN`
51+
- Default: false
52+
53+
### -h, --help
54+
55+
- Prints the help information.
56+
- Data type: `BOOLEAN`
57+
- Default: false
58+
59+
## Output
60+
61+
The execution log of the tiup-dm.

tiup/tiup-component-dm-start.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: tiup dm start
3+
---
4+
5+
# tiup dm start
6+
7+
The `tiup dm start` command is used to start all or part of the services of the specified cluster.
8+
9+
## Syntax
10+
11+
```shell
12+
tiup dm start <cluster-name> [flags]
13+
```
14+
15+
`<cluster-name>`: the name of the cluster to operate on. If you forget the cluster name, you can check it with the [cluster list]<!-- (/tiup/tiup-component-dm-list.md) --> command.
16+
17+
## Options
18+
19+
### -N, --node
20+
21+
- Specifies the nodes to be started. If not specified, all nodes are started. The value of this option is a comma-separated list of node IDs. The node ID is the first column of the [cluster status]<!-- (/tiup/tiup-component-dm-display.md) -->table.
22+
- Data type: `strings`
23+
- Default: `[]`. If this option is not specified in the command, all nodes are started.
24+
25+
> **Note:**
26+
>
27+
> If the `-R, --role` option is specified at the same time, then the services in their intersection are started.
28+
29+
### -R, --role
30+
31+
- Specifies the roles to be started. If not specified, all roles are started. The value of this option is a comma-separated list of node roles. The role is the second column of the [cluster status]<!--(/tiup/tiup-component-dm-display.md) --> table.
32+
- Data type: `strings`
33+
- Default: `[]`. If this option is not specified in the command, all roles are started.
34+
35+
> **Note:**
36+
>
37+
> If the `-N, --node` option is specified at the same time, the services in their intersection are started.
38+
39+
### -h, --help
40+
41+
- Prints the help information.
42+
- Data type: `BOOLEAN`
43+
- Default: false
44+
45+
## Output
46+
47+
The log of starting the service.

tiup/tiup-component-dm-stop.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: tiup dm stop
3+
---
4+
5+
# tiup dm stop
6+
7+
The `tiup dm stop` command is used to stop all or part of the services of the specified cluster.
8+
9+
> **Note:**
10+
>
11+
> The cluster cannot provide services after the core service is stopped.
12+
13+
## Syntax
14+
15+
```shell
16+
tiup dm stop <cluster-name> [flags]
17+
```
18+
19+
`<cluster-name>`: the name of the cluster to operate on. If you forget the cluster name, you can check it with the [cluster list]<!--(/tiup/tiup-component-dm-list.md) -->command.
20+
21+
## Options
22+
23+
### -N, --node
24+
25+
- Specifies the nodes to be stopped. If not specified, all nodes are stopped. The value of this option is a comma-separated list of node IDs. The node ID is the first column of the [cluster status]<!-- (/tiup/tiup-component-dm-display.md) --> table.
26+
- Data type: `strings`
27+
- Default: `[]`, which means all nodes are selected.
28+
29+
> **Note:**
30+
>
31+
> If the `-R, --role` option is specified at the same time, then the service status in their intersection is stopped.
32+
33+
### -R, --role
34+
35+
- Specifies the roles to be stopped. If not specified, all roles are stopped. The value of this option is a comma-separated list of node roles. The role is the second column of the [cluster status]<!-- (/tiup/tiup-component-dm-display.md) --> table.
36+
- Data type: `strings`
37+
- Default: `[]`, which means all roles are selected.
38+
39+
> **Note:**
40+
>
41+
> If the `-N, --node` option is specified at the same time, the services in their intersection is stopped.
42+
43+
### -h, --help
44+
45+
- Prints the help information.
46+
- Data type: `BOOLEAN`
47+
- Default: false
48+
49+
## Output
50+
51+
The log of stopping the service.

0 commit comments

Comments
 (0)