Restore storage.config + volume.config as fallback for storage.yaml#13191
Open
masaori335 wants to merge 3 commits into
Open
Restore storage.config + volume.config as fallback for storage.yaml#13191masaori335 wants to merge 3 commits into
masaori335 wants to merge 3 commits into
Conversation
PR apache#13031 replaced the legacy line-based storage.config and volume.config with storage.yaml. Restore backward compatibility: prefer storage.yaml when present, fall back to the legacy files when it is absent, and warn if both are present.
Contributor
There was a problem hiding this comment.
Pull request overview
Restores backward compatibility for cache storage configuration by preferring storage.yaml when present and introducing a legacy fallback path to storage.config + volume.config, along with documentation and an autest covering the fallback behavior.
Changes:
- Add runtime selection logic in cache initialization to load
storage.yamlwhen present, otherwise fall back to legacystorage.config+volume.configwith appropriate logging. - Update filename constants / config registration to distinguish
storage.yamlfrom legacy filenames and exposeproxy.config.cache.volume_filename. - Add gold test coverage and admin-guide docs for the legacy configuration files and backward-compatibility behavior.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/gold_tests/config/legacy_storage_config/volume.config | Adds legacy volume.config fixture for fallback autest. |
| tests/gold_tests/config/legacy_storage_config/storage.config | Adds legacy storage.config fixture for fallback autest. |
| tests/gold_tests/config/legacy_storage_config_fallback.test.py | New autest validating startup/logging when only legacy config files are present. |
| tests/gold_tests/autest-site/trafficserver.test.ext | Adds use_legacy_storage option to avoid staging default storage.yaml in tests. |
| src/traffic_server/traffic_server.cc | Registers storage.yaml as the “storage” static config file in the registry. |
| src/traffic_layout/info.cc | Updates layout info output to report storage.yaml path key. |
| src/records/RecordsConfig.cc | Adds proxy.config.cache.volume_filename record entry. |
| src/iocore/cache/Store.cc | Implements runtime storage.yaml-preferred parsing with legacy fallback + warnings. |
| src/iocore/cache/Cache.cc | Updates fatal error message to reference storage.yaml. |
| include/tscore/Filenames.h | Splits storage constants into STORAGE_YAML, STORAGE (legacy), and VOLUME (legacy). |
| include/iocore/cache/Store.h | Updates comment to reflect YAML or legacy config sources. |
| doc/admin-guide/files/volume.config.en.rst | Adds legacy volume.config documentation (deprecated) and migration guidance. |
| doc/admin-guide/files/storage.yaml.en.rst | Documents backward-compatibility selection behavior. |
| doc/admin-guide/files/storage.config.en.rst | Adds legacy storage.config documentation (deprecated) and migration guidance. |
| doc/admin-guide/files/index.en.rst | Adds legacy storage docs to the admin-guide file index. |
| } | ||
| volume_config = std::move(volume_result.value); | ||
| } else { | ||
| Note("%s not found, treating as no volumes configured", ts::filename::VOLUME); |
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.
PR #13031 replaced the legacy line-based storage.config and volume.config with storage.yaml. Restore backward compatibility: prefer storage.yaml when present, fall back to the legacy files when it is absent, and warn if both are present.