pingcap / tiup

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

`tiup update --all` doesn't work when there's an installed component is no longer supported anymore #180

Closed tshqin closed 4 years ago

tshqin commented 4 years ago

it's not quite friendly in current setup, need to improve the usability

[tidb@TiDB-1 ~]$ tiup book
Error: component `book` does not support `linux/amd64` (see `tiup list --refresh`)
[tidb@TiDB-1 ~]$ tiup list --refresh
Available components (Last Modified: 2020-02-27T15:20:35+08:00):
Name               Installed    Platforms                 Description
----               ---------    ---------                 -----------
tidb                            darwin/amd64,linux/amd64  TiDB is an open source distributed HTAP database compatible with the MySQL protocol
tikv                            darwin/amd64,linux/amd64  Distributed transactional key-value database, originally created to complement TiDB
pd                              darwin/amd64,linux/amd64  PD is the abbreviation for Placement Driver. It is used to manage and schedule the TiKV cluster
playground                      darwin/amd64,linux/amd64  Bootstrap a local TiDB cluster
client                          darwin/amd64,linux/amd64  A simple mysql client to connect TiDB
prometheus                      darwin/amd64,linux/amd64  The Prometheus monitoring system and time series database.
package                         darwin/amd64,linux/amd64  A toolbox to package tiup component
grafana                         darwin/amd64,linux/amd64  Grafana is the open source analytics & monitoring solution for every database
alertmanager                    darwin/amd64,linux/amd64  Prometheus alertmanager
blackbox_exporter               darwin/amd64,linux/amd64  Blackbox prober exporter
node_exporter                   darwin/amd64,linux/amd64  Exporter for machine metrics
pushgateway                     darwin/amd64,linux/amd64  Push acceptor for ephemeral and batch jobs
drainer                         darwin/amd64,linux/amd64  The drainer componet of TiDB binlog service
pump                            darwin/amd64,linux/amd64  The pump componet of TiDB binlog service
cluster            YES(v0.4.8)  darwin/amd64,linux/amd64  Deploy a TiDB cluster for production
mirrors                         darwin/amd64,linux/amd64  Build a local mirrors and download all selected components
bench                           darwin/amd64,linux/amd64  Benchmark database with different workloads
doc                             darwin/amd64,linux/amd64  Online document for TiDB
ctl                             darwin/amd64,linux/amd64  
[tidb@TiDB-1 ~]$ tiup update --all
Error: component `book` not found
tshqin commented 4 years ago

btw, you can fix it by the steps below:

[tidb@TiDB-1 ~]$ tiup uninstall book 
Use `tiup uninstall book --all` if you want to remove all versions.
[tidb@TiDB-1 ~]$ tiup uninstall book --all
Uninstalled component `book` successfully!
[tidb@TiDB-1 ~]$ tiup update --all
download https://tiup-mirrors.pingcap.com/cluster-v0.4.9-linux-amd64.tar.gz 17.56 MiB / 17.56 MiB 100.00% 67.21 KiB p/s                                                                                                                  
Update successfully!
lonng commented 4 years ago

Fixed