broker: persistence: downgrade unknown keys in state file from err to warn #63
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.
This makes it so that a
tacd
will not fail to start if it encounters a state file that was written by a newertacd
version.This means we actually have to use the versioning scheme we already have when a new persistence key e.g. has security implications that may not be lost in e.g. a new -> old -> new cycle.
Once such a change occurs we have the option to:
format_version
field in the state file and make oldertacd
s fail to start that way./srv/tacd/state-v2.json
and also read from there if it exists, but fall back to the current path if it does not. This means old tacds keep reading the file they created and a new tacd will read from there and migrate.But that's a problem for future us.
Right now just make sure that the
tacd
does not crash after an update.