tikv / pd

Placement driver for TiKV
Apache License 2.0
1.05k stars 724 forks source link

pd-ctl should return non-zero exit code on error #8762

Open cjc7373 opened 3 weeks ago

cjc7373 commented 3 weeks ago

Enhancement Task

In some automated scripts, it is hard to tell if a command succeeds because pd-ctl returns 0 on error.

For example:

[root@tidb-cluster-tikv-0 /]# /pd-ctl -u "$PD_ADDRESS" store delete addr ""
address not found: 
[root@tidb-cluster-tikv-0 /]# echo $?
0
rleungx commented 2 weeks ago

PTAL @JackL9u