Move Raft protocol for operator raft list-peers into endpoint, make aware of address mapping #3449
Labels
theme/operator-usability
Replaces UX. Anything related to making things easier for the practitioner
type/enhancement
Proposed improvement or new feature
Milestone
Chasing down something for #1580 I noticed that the Raft protocol is looked up by node name (https://github.com/hashicorp/consul/blob/v0.9.3-rc1/command/operator_raft_list.go#L67-L77) while all the rest of the information is added internally by address (https://github.com/hashicorp/consul/blob/v0.9.3-rc1/agent/consul/operator_raft_endpoint.go#L36-L46).
It's not good that we index these in two ways, which could lead to confusion, and we can simplify this by adding the Raft protocol to the endpoint response and doing the mapping there. This also simplifies the ACL story for the endpoint since it doesn't need to do an extra call.
It would also be good to add some information to the endpoint and the CLI output to show when an address is being re-mapped. Might be good to have an extra column like
Effective Address
. Anything we can do to make it super clear what's going on is definitely worth it.The text was updated successfully, but these errors were encountered: