Skip to content
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

Show raft protocol in list-peers command #2929

Merged
merged 2 commits into from
Apr 19, 2017
Merged

Conversation

kyhavlov
Copy link
Contributor

This adds the raft protocol version to the list-peers subcommand:

$ consul operator raft list-peers
Node     ID              Address         State   Voter  RaftProtocol
macbook  127.0.0.1:8300  127.0.0.1:8300  leader  true   2

@kyhavlov kyhavlov requested a review from slackpad April 19, 2017 20:55
Copy link
Contributor

@slackpad slackpad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs doc updates as well as a couple minor things, otherwise looks good.

for _, s := range reply.Servers {
raftProtocol := raftProtocols[s.Node]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about an "unknown" if the version isn't there. Or we could show "1" even, since that's what older clients are running (or "<=1").

@@ -6,6 +6,7 @@ import (

"github.com/hashicorp/consul/command/base"
"github.com/mitchellh/cli"
"fmt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should move up.

@kyhavlov kyhavlov merged commit f25cac4 into master Apr 19, 2017
@kyhavlov kyhavlov deleted the show-raft-protocol branch April 19, 2017 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants