Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When destroying the cluster, the incorrect cluster name can still be destroyed successfully #1176

Closed
together-wang opened this issue Mar 3, 2021 · 0 comments · Fixed by #1177
Labels
type/bug Categorizes issue as related to a bug.

Comments

@together-wang
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
  • When destroying the cluster, the incorrect cluster name can still be destroyed successfully.
[tidb@node127 wxj]$ tiup cluster list
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.3.2/tiup-cluster list
Name  User  Version  Path                                           PrivateKey
----  ----  -------  ----                                           ----------
lwt   tidb  v4.0.11  /home/tidb/.tiup/storage/cluster/clusters/lwt  /home/tidb/.tiup/storage/cluster/clusters/lwt/ssh/id_rsa

[tidb@node127 home]$ tiup cluster display lwt/
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.3.2/tiup-cluster display lwt/
Cluster type:       tidb
Cluster name:       lwt/
Cluster version:    v4.0.11
SSH type:           builtin
[tidb@node127 home]$ tiup cluster destroy lwt/
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.3.2/tiup-cluster destroy lwt/
This operation will destroy tidb v4.0.11 cluster lwt/ and its data.
Do you want to continue? [y/N]: y
Destroying cluster...
+ [ Serial ] - SSHKeySet: privateKey=/home/tidb/.tiup/storage/cluster/clusters/lwt/ssh/id_rsa, publicKey=/home/tidb/.tiup/storage/cluster/clusters/lwt/ssh/id_rsa.pub
+ [Parallel] - UserSSH: user=tidb, host=172.16.4.127
+ [Parallel] - UserSSH: user=tidb, host=172.16.5.215
+ [Parallel] - UserSSH: user=tidb, host=172.16.4.222
+ [Parallel] - UserSSH: user=tidb, host=172.16.4.127
+ [Parallel] - UserSSH: user=tidb, host=172.16.4.127
+ [Parallel] - UserSSH: user=tidb, host=172.16.5.215
+ [Parallel] - UserSSH: user=tidb, host=172.16.4.222
+ [Parallel] - UserSSH: user=tidb, host=172.16.5.215
+ [Parallel] - UserSSH: user=tidb, host=172.16.4.127
+ [ Serial ] - StopCluster
Stopping component grafana
        Stopping instance 172.16.4.127
        Stop grafana 172.16.4.127:3105 success
Stopping component prometheus
        Stopping instance 172.16.4.127
        Stop prometheus 172.16.4.127:9305 success
Stopping component tidb
        Stopping instance 172.16.5.215
        Stop tidb 172.16.5.215:4200 success
Stopping component tikv
        Stopping instance 172.16.4.222
        Stopping instance 172.16.4.127
        Stopping instance 172.16.5.215
        Stop tikv 172.16.4.127:20275 success
        Stop tikv 172.16.4.222:20275 success
        Stop tikv 172.16.5.215:20275 success
Stopping component pd
        Stopping instance 172.16.4.127
        Stopping instance 172.16.5.215
        Stopping instance 172.16.4.222
        Stop pd 172.16.4.127:2494 success
        Stop pd 172.16.4.222:2494 success
        Stop pd 172.16.5.215:2494 success
Stopping component node_exporter
Stopping component blackbox_exporter
Stopping component node_exporter
Stopping component blackbox_exporter
Stopping component node_exporter
Stopping component blackbox_exporter
+ [ Serial ] - DestroyCluster
Destroying component grafana
Destroying instance 172.16.4.127
Destroy 172.16.4.127 success
- Destroy grafana paths: [/tidb-deploy/grafana-3105 /etc/systemd/system/grafana-3105.service]
Destroying component prometheus
Destroying instance 172.16.4.127
Destroy 172.16.4.127 success
- Destroy prometheus paths: [/tidb-deploy/prometheus-9305/log /tidb-deploy/prometheus-9305 /etc/systemd/system/prometheus-9305.service /tidb-data/prometheus-9305]
Destroying component tidb
Destroying instance 172.16.5.215
Destroy 172.16.5.215 success
- Destroy tidb paths: [/tidb-deploy/tidb-4200/log /tidb-deploy/tidb-4200 /etc/systemd/system/tidb-4200.service]
Destroying component tikv
Destroying instance 172.16.4.127
Destroy 172.16.4.127 success
- Destroy tikv paths: [/tidb-deploy/tikv-20275/log /tidb-deploy/tikv-20275 /etc/systemd/system/tikv-20275.service /tidb-data/tikv-20275]
Destroying instance 172.16.5.215
Destroy 172.16.5.215 success
- Destroy tikv paths: [/etc/systemd/system/tikv-20275.service /tidb-data/tikv-20275 /tidb-deploy/tikv-20275/log /tidb-deploy/tikv-20275]
Destroying instance 172.16.4.222
Destroy 172.16.4.222 success
- Destroy tikv paths: [/tidb-deploy/tikv-20275 /etc/systemd/system/tikv-20275.service /tidb-data/tikv-20275 /tidb-deploy/tikv-20275/log]
Destroying component pd
Destroying instance 172.16.5.215
Destroy 172.16.5.215 success
- Destroy pd paths: [/tidb-deploy/pd-2494 /etc/systemd/system/pd-2494.service /tidb-data/pd-2494 /tidb-deploy/pd-2494/log]
Destroying instance 172.16.4.222
Destroy 172.16.4.222 success
- Destroy pd paths: [/tidb-data/pd-2494 /tidb-deploy/pd-2494/log /tidb-deploy/pd-2494 /etc/systemd/system/pd-2494.service]
Destroying instance 172.16.4.127
Destroy 172.16.4.127 success
- Destroy pd paths: [/tidb-deploy/pd-2494 /etc/systemd/system/pd-2494.service /tidb-data/pd-2494 /tidb-deploy/pd-2494/log]
Destroying monitored 172.16.5.215
        Destroying instance 172.16.5.215
Destroy monitored on 172.16.5.215 success
Destroying monitored 172.16.4.222
        Destroying instance 172.16.4.222
Destroy monitored on 172.16.4.222 success
Destroying monitored 172.16.4.127
        Destroying instance 172.16.4.127
Destroy monitored on 172.16.4.127 success
Clean global directories 172.16.5.215
        Clean directory /tidb-deploy on instance 172.16.5.215
        Clean directory /tidb-data on instance 172.16.5.215
Clean global directories 172.16.5.215 success
Clean global directories 172.16.4.222
        Clean directory /tidb-deploy on instance 172.16.4.222
        Clean directory /tidb-data on instance 172.16.4.222
Clean global directories 172.16.4.222 success
Clean global directories 172.16.4.127
        Clean directory /tidb-deploy on instance 172.16.4.127
        Clean directory /tidb-data on instance 172.16.4.127
Clean global directories 172.16.4.127 success
Delete public key 172.16.4.222
Delete public key 172.16.4.222 success
Delete public key 172.16.4.127
Delete public key 172.16.4.127 success
Delete public key 172.16.5.215
Delete public key 172.16.5.215 success
Destroyed cluster `lwt/` successfully

image

  1. What did you expect to see?
  • Check whether the entered cluster name is valid when executing commands such as display/start/destroy
  1. What did you see instead?
  • When an illegal cluster name is entered, the destruction is successful.
  1. What version of TiUP are you using (tiup --version)?
[tidb@node127 home]$ tiup --version
v1.3.2 tiup
Go Version: go1.13
Git Branch: release-1.3
GitHash: 2d88460
@together-wang together-wang added the type/bug Categorizes issue as related to a bug. label Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Categorizes issue as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant