-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport of [NET-3865] [Supportability] Additional Information in the output of 'consul operator raft list-peers' into release/1.16.x #17738
Conversation
8e250b2
to
441ecc0
Compare
c9ceaa1
to
719855a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto approved Consul Bot automated PR
@absolutelightning We should merge this PR into 1.16.x after GA since code freeze happened yesterday. |
…urally-busy-raccoon
@absolutelightning Could you check that all the commits went into this PR? Feel free to merge as this won't affect the 1.16.0 GA if we merge to |
@david-yu Resolved |
Backport
This PR is auto-generated from #17582 to be assessed for backporting due to the inclusion of the label backport/1.16.
🚨
The person who merged in the original PR is:
@absolutelightning
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.
The below text is copied from the body of the original PR.
Description
As per requirement of NET - 3865, We want to have the 'commit_index' to be included in the output of 'consul operator raft list-peers -detailed'. This feature specifically useful in the cases where Consul is being upgraded to determine the replication rate and intervene as needed.
I have implemented it by calling a API
/v1/operator/autopilot/health
, storing the response in a map -> [server id, OperatorHealthReply]. Then this data is used to print the Commit Index by matching the id of server from this to server id in RaftGetConfiguration.Testing
Create a consul cluster by following this tutorial.
kubectl exec -it consul-server-0 -n consul -- /bin/sh
in one terminalkubectl exec -it consul-server-1 -n consul -- /bin/sh
in other terminaldo a ps and kill
consul agent
in the second terminal.Run command
consul operator raft list-peers
consul operator raft list-peers
PR Checklist
Overview of commits