Repository navigation
feat(cli,quorum): kates raft ps shows every quorum member's Raft state - #700
Merged
Merged
Conversation
GET /api/quorum asks each member, itself included, for its Ratis group info over the members' mutual-TLS client: role, term, time in role, commit/applied/last/snapshot index, storage health, and from the leader how long ago it last heard from each follower. Any member answers with the whole quorum; a member that does not answer within 800 ms carries only its error. kates raft ps prints one row per member with its lag behind the leader's commit index, and a summary line naming the leader, how long it has led, and whether a majority answered. It needs no command profile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
kates raft psprints the Raft state of every Kates quorum member (Apache Ratis, operator mode):How
GET /api/quorum(read scope, newQuorumResource): the answering member asks each member, itself included, for its Ratis group info (GroupManagementApi.info) over the client it already holds on the members' mutual-TLS port. Each row has role, term, time in role, commit/applied/last/snapshot index and storage health; the leader's reply adds the last contact with each follower. A member that does not answer within 800 ms carries onlyerror. A Kates running alone returnsenabled: false.kates raft ps(and-o json) computes the lag behind the leader's commit index and a majority check. Always enabled, likehealth.docs/book/11-api-reference.md.Limits
termis the term of the last entry: the current term once the leader has committed its first entry.Tests
QuorumMemberTest.anyMemberReportsEveryMemberAndOneThatDoesNotAnswer: three real members over mTLS; a follower sees all three with the right leader, term and last contact, and a stopped member as an error row. All 11QuorumMemberTestpass, plusEndpointScopesTestandQuorumGateTest.cli/cmd/raft_test.go: healthy, no-quorum and alone cases; full CLI suite passes.Not run on a live operator-mode cluster or in the native image yet: the native build may need reflection config for the Ratis group-info protos.