Ensure keyset warnings are logged and included in zone history.#207
Merged
Ensure keyset warnings are logged and included in zone history.#207
Conversation
- Move all dnst execution into KeyManager.
- Merge KeyRollResult and KeyRemoveResult into new
KeySetCommandResult.
- Merge KeyRollError and KeyRollResult into new KetSetCommandError.
- Add new ApplicationCommand::KeySetStatus which KeyManager responds
to.
- Use new ApplicationCommand::KeySetStatus from http_server instead of
invoking dnst keyset directly.
- Capture stderr even for failed dnst keyset commands. Log and store it
as a warning.
- Add support for "silent" dnst keyset execution so that KeyManager can
invoke `dnst keyset status` and only record it in the zone history of
there were
warnings or errors, otherwise `cascade zone status` commands will spam
the zone
history.
Other:
- Replace `log::` with imports.
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.
In #193 we saw that a
dnst keyset croninvocation experienced a transient network error resulting in "Something went wrong transferring the zone to be verified." being shown bydnst keyset status. However there was no record of this transient problem anywhere becausednst keyset crondid not fail, it exited with code zero, but DID print to stderr. Capturing of stderr was only done if the exit code was non-zero, so the warning that was output was lost.Additionally, while
dnst keysetcommands and errors are recorded in zone history, and logged as executed, if the command fails the error is not logged. only recorded in history.This PR addresses these shortcomings.
Specifically it:
dnst keyset statusand only record it in the zone history of there were warnings or errors, otherwisecascade zone statuscommands will spam the zone history.Other:
log::with imports.