txn_box: Log text block reload failures#13411
Open
bneradt wants to merge 1 commit into
Open
Conversation
Text blocks silently lose their file-backed content when a periodic reload can no longer read the configured file. Requests then see an empty block without an operator-visible diagnostic. This logs the transition to unavailable content once and adds regression coverage for a file that becomes unreadable. This also documents the error and fallback behavior. The original txn_box repository is defunct, so fixes for the plugin are now tracked in the Traffic Server repository. This patch addresses: SolidWallOfCode/txn_box#90
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves operator visibility for the experimental txn_box plugin’s file-backed text blocks by logging (once) when periodic reloads lose access to the configured file and the block content is cleared. It also adds a gold test to cover the “file becomes unreadable” scenario and updates the user documentation to describe the error/fallback behavior.
Changes:
- Log a one-time ERROR when a periodic text-block reload fails after previously having file content (transition to unavailable content).
- Add AuTest regression coverage that makes a configured text-block file unreadable during runtime and asserts the error is logged.
- Update directive reference documentation to clarify behavior when the file disappears or becomes unreadable.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
plugins/experimental/txn_box/plugin/src/text_block.cc |
Logs the transition from available file content to unavailable content when reload fails, without holding the content lock during logging. |
tests/gold_tests/pluginTest/txn_box/static_file/txn_box_static_file.test.py |
Adds a runtime permission-change step and asserts the expected error appears in diags.log. |
tests/gold_tests/pluginTest/txn_box/static_file/static_file.replay.yaml |
Defines an unreadable text block with a short reload period to exercise the failure path. |
tests/gold_tests/pluginTest/txn_box/static_file/unreadable.txt |
Adds the file used by the new unreadable-file regression scenario. |
doc/admin-guide/plugins/txn_box/user/DirectiveReference.en.rst |
Documents the logged error and fallback behavior when a file becomes unreadable during update checking. |
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.
Text blocks silently lose their file-backed content when a periodic
reload can no longer read the configured file. Requests then see an
empty block without an operator-visible diagnostic.
This logs the transition to unavailable content once and adds
regression coverage for a file that becomes unreadable. This also
documents the error and fallback behavior.
The original txn_box repository is defunct, so fixes for the plugin are
now tracked in the Traffic Server repository. This patch addresses:
SolidWallOfCode/txn_box#90