pingcap / tiup

A component manager for TiDB
https://tiup.io
Apache License 2.0
427 stars 313 forks source link

when the first command is not finished, then received the second command, the system may need add a lock for this #809

Open seiya-annie opened 4 years ago

seiya-annie commented 4 years ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? for example: the cluster is starting, use 'tiup dm restart' command to restart the cluster the cluster is starting, use 'tiup dm destroy' command to destroy the cluster
  2. What did you expect to see?

the second command should return an error

  1. What did you see instead?

  2. What version of TiUP are you using (tiup --version)?

[root@localhost ~]# tiup --version v1.0.9 tiup Go Version: go1.13 Git Branch: master GitHash: 41fbacf [root@localhost ~]# tiup dm --version Starting component dm: /root/.tiup/components/dm/v1.1.2/tiup-dm --version tiup version v1.1.2 tiup Go Version: go1.13 Git Branch: release-1.1 GitHash: 7cb85b9-dirty [root@localhost ~]#

july2993 commented 4 years ago

should add a file lock to prevent this, both tiup-dm and tiup-cluster