tiup icon indicating copy to clipboard operation
tiup copied to clipboard

can't prune cluster due to false meta_yaml

Open Smityz opened this issue 2 years ago • 2 comments

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

I scale-in my cluster, then want to prune data, but some nodes don't appear in the prune list

tiup cluster display result

xxx.xxx.166.2:20080    tikv          xxx.xxx.166.2    20080/20081  linux/x86_64  Tombstone        /mnt/disk/8/xxx/tikv/20080       /home/kvstore/xxx/tikv-20080
xxx.xxx.166.2:20090    tikv          xxx.xxx.166.2    20090/20091  linux/x86_64  Tombstone        /mnt/disk/9/xxx/tikv/20090       /home/kvstore/xxx/tikv-20090

but the prune list is empty

Will destroy these nodes: []

This is because meta_yaml is not showing the right information. now meta_yaml

- host: xxx.xxx.166.2
ssh_port: 22
port: 20080
status_port: 20081
deploy_dir: /home/kvstore/xxx/tikv-20080
data_dir: /mnt/disk/8/xxx/tikv/20080
log_dir: /home/kvstore/xxx/tikv-20080/log
config:
  server.labels:
    host: xxx.xxx.166.2
arch: amd64
os: linux

expect meta_yaml

- host: xxx.xxx.166.2
ssh_port: 22
port: 20080
status_port: 20081
deploy_dir: /home/kvstore/xxx/tikv-20080
data_dir: /mnt/disk/8/xxx/tikv/20080
log_dir: /home/kvstore/xxx/tikv-20080/log
offline: true.  // offline not set now
config:
  server.labels:
    host: xxx.xxx.166.2
arch: amd64
os: linux

maybe we should provide an interface to refresh meta_yaml?

  1. What version of TiUP are you using (tiup --version)? v1.10.2

Smityz avatar Aug 03 '22 11:08 Smityz

Have you changed the meta.yaml file using any tool expect tiup ?

qqqdan avatar Aug 08 '22 02:08 qqqdan

No, I just used scale-in with nohup

Smityz avatar Aug 08 '22 03:08 Smityz