Skip to content

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

@cjc7373

Description

@cjc7373

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions