6.1 After specifying raft-engine.dir, destroy cannot clean up directory files

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

Original topic: 6.1指定raft-engine.dir后destroy不能清理目录文件

| username: h5n1

[Version] v6.1.0
[Phenomenon]
After specifying raft-engine.dir in version 6.1, the destroy command cannot clean up the directory files. When redeploying, the following error is reported, and the directory specified by raft-engine.dir needs to be manually deleted:
{ssh_stderr: invalid configuration: Found raft data set when it should not exist.
, ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin /tidb/deploy/tikv-20160/bin/tikv-server --config-check --config=/tidb/deploy/tikv-20160/conf/tikv.toml --pd “” --data-dir “/data/tikv/tikv-20160”}, cause: Process exited with status 1: check config failed

| username: jansu-dev | Original post link

Is this issue related to the permissions configured according to the official documentation? You can try to reproduce it and observe the cleanup actions of tiup in your environment, as well as the /var/log/message situation.

Has this issue been resolved?

| username: h5n1 | Original post link

The permissions are sudo without password for ALL privileges. Let me try it in the test environment first.

| username: h5n1 | Original post link

Tested again in a different environment, still the same issue. After destroy, raft-engine.dir does not automatically clean up.