Skip to content

Restore storage.config + volume.config as fallback for storage.yaml#13191

Open
masaori335 wants to merge 3 commits into
apache:masterfrom
masaori335:asf-master-storage-yaml-restore
Open

Restore storage.config + volume.config as fallback for storage.yaml#13191
masaori335 wants to merge 3 commits into
apache:masterfrom
masaori335:asf-master-storage-yaml-restore

Conversation

@masaori335
Copy link
Copy Markdown
Contributor

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.

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.
@masaori335 masaori335 added this to the 11.0.0 milestone May 22, 2026
@masaori335 masaori335 self-assigned this May 22, 2026
Copilot AI review requested due to automatic review settings May 22, 2026 04:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml when present, otherwise fall back to legacy storage.config + volume.config with appropriate logging.
  • Update filename constants / config registration to distinguish storage.yaml from legacy filenames and expose proxy.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.

Comment thread src/iocore/cache/Store.cc Outdated
Comment thread src/iocore/cache/Store.cc Outdated
Comment thread src/iocore/cache/Store.cc Outdated
Comment thread src/iocore/cache/Store.cc Outdated
Comment thread src/iocore/cache/Cache.cc Outdated
Comment thread doc/admin-guide/files/storage.yaml.en.rst
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Comment thread src/traffic_server/traffic_server.cc Outdated
Comment thread src/iocore/cache/Store.cc
Comment thread src/iocore/cache/Store.cc Outdated
}
volume_config = std::move(volume_result.value);
} else {
Note("%s not found, treating as no volumes configured", ts::filename::VOLUME);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants