Skip to content

Commit

Permalink
Merge pull request #5523 from travisdowns/td-5521-rpk-leaderless-part…
Browse files Browse the repository at this point in the history
…itions

Fix json -> object mapping in cluster health

rpk cluster health would never show any leaderless partitoins because
of a missing s in the json mapping: leaderless_partition (incorrect) vs
leaderless_partitions (correct).

Fixes #5521.
  • Loading branch information
travisdowns committed Jul 19, 2022
2 parents 9f0077c + fa4e5c7 commit 5743404
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/go/rpk/pkg/api/admin/api_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type ClusterHealthOverview struct {
ControllerID int `json:"controller_id"`
AllNodes []int `json:"all_nodes"`
NodesDown []int `json:"nodes_down"`
LeaderlessPartitions []string `json:"leaderless_partition"`
LeaderlessPartitions []string `json:"leaderless_partitions"`
}

func (a *AdminAPI) GetHealthOverview(ctx context.Context) (ClusterHealthOverview, error) {
Expand Down

0 comments on commit 5743404

Please sign in to comment.