Modifying topo.yaml and restarting the cluster configuration did not take effect

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 修改topo.yaml重启集群配置没有生效

| username: TiDB_CDD

[Test Environment for TiDB] Testing
[TiDB Version] 8.0.0
[Reproduction Path] Modify the topo.yaml configuration file
[Encountered Issue: Phenomenon and Impact] Restarting the cluster still uses the previous configuration, and the new configuration has not taken effect
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

| username: tidb菜鸟一只 | Original post link

No, did you modify it through tiup cluster edit-config? Or did you directly modify the YAML file?

| username: Jolyne | Original post link

tiup cluster edit-config modification

| username: 小龙虾爱大龙虾 | Original post link

What did you change? Please send the specific steps.

| username: 这里介绍不了我 | Original post link

Did you add a label to TiKV? Then using ps -ef to check the process, the address is still, right?

| username: 这里介绍不了我 | Original post link

Take a look at Schedule Replicas by Topology Labels | PingCAP Documentation Center. The main purpose of labeling is for replica scheduling. The process -addr you are checking will not change.

| username: TIDB-Learner | Original post link

When creating a table, you can specify the distribution of data Regions on the host label. The ps -ef command shows the processes on the host.

| username: Kongdom | Original post link

Restart will not reload the configuration; you need to reload to both reload the configuration and restart.

| username: zhanggame1 | Original post link

Did you reload?

| username: xiaoqiao | Original post link

First, reload it, and then post it to take a look.

| username: Daniel-W | Original post link

Use tiup cluster show-config to check the configuration you modified, and then see if it needs to be reloaded.

| username: Soysauce520 | Original post link

It looks like an issue with the modification method. The YAML file used during installation basically loses its effect after installation. If you need to modify it, you should use tiup cluster edit-config, and to take effect, you need to reload the corresponding components to distribute the new config.

| username: zhang_2023 | Original post link

This is only used during installation.

| username: yulei7633 | Original post link

Restarting will not load the configuration file; you need to reload it. I encountered this before and specifically tested it.

| username: TiDB_CDD | Original post link

Directly modified the YAML file, but tiup cluster edit-config failed.

| username: TiDB_CDD | Original post link

Okay, thank you.

| username: TiDB_CDD | Original post link

Yes, you need to use tiup cluster edit-config to modify it.

| username: TiDB_CDD | Original post link

I directly modified the yaml file. You should use tiup cluster edit-config to modify the configuration and then reload.

| username: tidb菜鸟一只 | Original post link

You don’t need to add a label; you need to change the port, right? In that case, you can’t modify it online. It would be better to scale up and then scale down directly…

| username: TiDB_CDD | Original post link

I want to reduce the number of tikv_servers instances. During installation, I deployed three instances on the same machine according to the configuration provided in the template. Now, three tikv_servers instances are running, and I want to reduce it by two instances. I don’t know how to handle it.