-
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
Consul Snapshot State Command Feature #20831
Closed
Closed
Conversation
This file contains 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
…limit snapshot return
…limit snapshot return
…limit snapshot return
…limit snapshot return
github-actions
bot
added
theme/cli
Flags and documentation for the CLI interface
pr/dependencies
PR specifically updates dependencies of project
labels
Mar 11, 2024
@natemollica-nm TBH I didn't know this PR existed but did know that there have been many times we have wanted to ask users about data in a snapshot and have been unable to do so and so I created my PR. There are three reasons why I think I would prefer my approach to the one taken in this PR:
|
@mkeeler Awesome! Thanks for detailing the engineering insight behind your PR 😀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
pr/dependencies
PR specifically updates dependencies of project
theme/cli
Flags and documentation for the CLI interface
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.
Description
Consul Snapshot backup inspection is somewhat limited for in-depth troubleshooting scenarios. This command addition provides users a more human-readable format to inspect Consul's raft state from a snapshot backup.
This PR introduces a raftutil concept that mirrors that of our Nomad product where a temporary "dummy" FSM is spawned, the snapshot archive is read into this, and subsequently redirected to
stdout
for usability.Inspired by several extended troubleshooting efforts surrounding WAN Federation replication, an Enterprise Namespace issues. This command allows more detailed snapshot backup file inspection for:
Testing & Reproduction steps
consul snapshot save backup.snap
consul snapshot state backup.snap
on backup and observed JSON interpreted state from backup to be usable.consul snapshot state -filter "Nodes" backup.snap
JSON Filtered Return
Links
Nomad Equivalent Command:
nomad operator snapshot state <file>
PR Checklist