Configuration Issues for Scaling Up and Down

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

Original topic: 扩容缩容的配置文件问题

| username: Jolyne

[TiDB Usage Environment] Production Environment / Testing / Poc
Production Environment
[TiDB Version]
5.2.1
[Reproduction Path] What operations were performed when the issue occurred
After scaling down, I used tiup cluster edit-config to view the configuration file of the cluster, which still had the configuration file after scaling down. Then I restarted the entire cluster, and an error occurred. How do I delete the previous configuration file from the cluster configuration file?
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: Billmay表妹 | Original post link

What is the error message?

| username: Jolyne | Original post link

Directly reloading the cluster prompts to load the previously deleted configuration information. I started the components in the following order: PD → TiKV → Pump → TiDB → TiFlash → Drainer → TiCDC → Prometheus → Grafana → Alertmanager, and only then was I able to bring the cluster up.

| username: Billmay表妹 | Original post link

Is the issue resolved now?

| username: Jolyne | Original post link

The cluster was started in order, but starting the cluster directly doesn’t work. If you use edit-cluster to delete the configuration, it cannot be saved and exited. I just want to know how to delete the residual error messages.

| username: xfworld | Original post link

Are you referring to the configuration information of tiup? Back it up first.

After deleting it, the cluster information will be lost. If it doesn’t work, restore the backup.

| username: Jolyne | Original post link

That’s right, it can only be done this way. It feels a bit troublesome. Isn’t there something like vim where you can modify, save, and exit to take effect? :joy:

| username: xfworld | Original post link

After making the changes, restart the relevant nodes or the entire cluster for the parameters to take effect.

| username: Jolyne | Original post link

Got it, it might be that a machine was not scaled down previously and was directly removed, causing the configuration file not to load and take effect, resulting in residual error messages… In this case, should we back it up as mentioned above?

| username: xfworld | Original post link

Better back it up, otherwise if this information is lost, manually rebuilding it… you’ll be :rofl: :rofl: :rofl: :rofl: :rofl: :rofl:

| username: WalterWj | Original post link

How did you scale down? You didn’t just edit the config to remove the relevant components, did you?

| username: Jolyne | Original post link

Yes, I didn’t use scale-in, just removed it directly, which caused the config information to still have the information of the scaled-down machines. :sweat_smile:

| username: Jolyne | Original post link

Okay, thank you very much.

| username: WalterWj | Original post link

Reducing capacity is not done this way; you need to follow the method outlined on the official website.

| username: Jolyne | Original post link

Yes, it was someone else’s misoperation. Is there any way to remove these error messages now and ensure that the configuration information is clean?

| username: WalterWj | Original post link

I think you can go to the suggestions and feedback section and propose that tiup should automatically back up meta files. For example, every time a modification is successfully saved, it can automatically back up the file before the modification.

| username: xfworld | Original post link

It can only be manually identified~
Quite troublesome