pingcap / tiup

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

Component is not unarchived if interrupted the last time #1077

Open sticnarf opened 3 years ago

sticnarf commented 3 years ago

Bug Report

  1. What did you do?

I ran tiup cdc and interrupted it before it unarchived the tar.gz. Then the second time I ran tiup cdc, it says it is already installed.

  1. What did you expect to see?

Unarchive the downloaded tar. I can also accept redownloading the archive.

  1. What did you see instead?

It didn't help me unarchive it nor redownload it.

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

v1.3.1

sticnarf commented 3 years ago

cc @lucklove

9547 commented 3 years ago

Similar issue, If the decompression procedure is not completed, decompression out of the binary may be incomplete, then invoke with it, there will be unexpected problems, in this case, we may need to prompt the user to download and install again.

eg:

tiup install cdc
Ctrl^C
...
tiup cdc
Starting component `cdc`: /root/.tiup/components/cdc/v5.0.0-rc/cdc
Error: run `/root/.tiup/components/cdc/v5.0.0-rc/cdc` (wd:/root/.tiup/data/SPfnaWs) failed: signal: segmentation fault
/root/.tiup/components/cdc/v5.0.0-rc/cdc
Segmentation fault