-
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.14.x #17736
Conversation
4274041
to
ffd20cf
Compare
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes 1 out of 2 committers have signed the CLA.
temp seems not to be a GitHub user. Have you signed the CLA already but the status is still pending? Recheck it. |
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
ffd20cf
to
4274041
Compare
…consul operator raft list-peers' (#17582) * init * fix tests * added -detailed in docs * added change log * fix doc * checking for entry in map * fix tests * removed detailed flag * removed detailed flag * revert unwanted changes * removed unwanted changes * updated change log * pr review comment changes * pr comment changes single API instead of two * fix change log * fix tests * fix tests * fix test operator raft endpoint test * Update .changelog/17582.txt Co-authored-by: Semir Patel <[email protected]> * nits * updated docs --------- Co-authored-by: Semir Patel <[email protected]>
…tefully-apt-haddock
@david-yu Who will approve from hashicorp/consul-docs? |
@analogue I'm not sure. I'll ping releng and copy you. |
It looks like the PR description when this was created has the answer:
There is no way to get around the no-op commit that created this PR. If you don't want to create a new PR, then you can locally do something like the below that will effectively get rid of the no-op commit if you have already cherry-picked into this branch:
|
Pull request was closed
Backport
This PR is auto-generated from #17582 to be assessed for backporting due to the inclusion of the label backport/1.14.
🚨
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