Skip to content

Rename raft configuration command to list-peers and make output easier to read#8484

Merged
briankassouf merged 3 commits into
masterfrom
raft-config-cli
Mar 6, 2020
Merged

Rename raft configuration command to list-peers and make output easier to read#8484
briankassouf merged 3 commits into
masterfrom
raft-config-cli

Conversation

@briankassouf
Copy link
Copy Markdown
Contributor

@briankassouf briankassouf commented Mar 6, 2020

Old:

% vault3 operator raft configuration
Key       Value
---       -----
config    map[index:67 servers:[map[address:vault2:8201 leader:true node_id:node2 protocol_version:3 voter:true] map[address:vault3:8201 leader:false node_id:node3 protocol_version:3 voter:true] map[address:vault4:8201 leader:false node_id:node4 protocol_version:3 voter:true]]]

New:

% vault3 operator raft list-peers
Node     Address        State       Voter
----     -------        -----       -----
node2    vault2:8201    leader      true
node3    vault3:8201    follower    true
node4    vault4:8201    follower    true

@briankassouf briankassouf added this to the 1.4 milestone Mar 6, 2020
@briankassouf briankassouf requested a review from vishalnayak March 6, 2020 01:58
calvn
calvn previously approved these changes Mar 6, 2020
Copy link
Copy Markdown
Contributor

@calvn calvn left a comment

Choose a reason for hiding this comment

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

Looks good! One small comment.

return 2
}
if secret == nil {
return 2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we output an error message for this case as well?

vishalnayak
vishalnayak previously approved these changes Mar 6, 2020
@briankassouf briankassouf dismissed stale reviews from vishalnayak and calvn via f2df633 March 6, 2020 20:41
@briankassouf briankassouf changed the title Make the output of raft configuration easier to read Rename raft configuration command to list-peers and make output easier to read Mar 6, 2020
vishalnayak
vishalnayak previously approved these changes Mar 6, 2020
Copy link
Copy Markdown
Contributor

@vishalnayak vishalnayak left a comment

Choose a reason for hiding this comment

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

Very neat!

Comment thread command/operator_raft.go
Restores and saves snapshots from the raft cluster:

$ vault operator raft snapshot take out.snap

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we also was a raft snapshot restore example?

Comment thread command/operator_raft_listpeers.go
calvn
calvn previously approved these changes Mar 6, 2020
Copy link
Copy Markdown
Contributor

@calvn calvn left a comment

Choose a reason for hiding this comment

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

Looks good, two small comments.

Co-Authored-By: Calvin Leung Huang <cleung2010@gmail.com>
@briankassouf briankassouf dismissed stale reviews from calvn and vishalnayak via e91f02a March 6, 2020 22:40
@briankassouf briankassouf merged commit ccb0dd7 into master Mar 6, 2020
@briankassouf briankassouf deleted the raft-config-cli branch March 6, 2020 22:41
briankassouf added a commit that referenced this pull request Mar 7, 2020
…r to read (#8484)

* Make the output of raft configuration easier to read

* Rename raft configuration sub command to list-peers

* Update command/operator_raft_listpeers.go

Co-Authored-By: Calvin Leung Huang <cleung2010@gmail.com>

Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>
briankassouf added a commit that referenced this pull request Mar 7, 2020
…r to read (#8484) (#8502)

* Make the output of raft configuration easier to read

* Rename raft configuration sub command to list-peers

* Update command/operator_raft_listpeers.go

Co-Authored-By: Calvin Leung Huang <cleung2010@gmail.com>

Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>

Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>
andaley pushed a commit that referenced this pull request Mar 13, 2020
…r to read (#8484)

* Make the output of raft configuration easier to read

* Rename raft configuration sub command to list-peers

* Update command/operator_raft_listpeers.go

Co-Authored-By: Calvin Leung Huang <cleung2010@gmail.com>

Co-authored-by: Calvin Leung Huang <cleung2010@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants