masaori335 opened a new pull request, #13354:
URL: https://github.com/apache/trafficserver/pull/13354
Backport #12892
----
ATS Configuration Reload with observability/tracing — Token model Replace
the fire-and-forget configuration reload mechanism with a new token-based,
observable reload framework. Every reload operation is now assigned a unique
token, tracked through a task tree, and queryable via CLI or JSONRPC at any
point after submission.
Core components introduced:
- ConfigRegistry: centralized singleton for config file registration,
filename records, trigger records, and reload handlers. Replaces the scattered
registration across AddConfigFilesHere.cc and individual modules.
- ReloadCoordinator: manages reload session lifecycle including token
generation, concurrency control (--force to override), timeout detection, and
rolling history.
- ConfigReloadTask: tracks a single reload as a tree of sub-tasks with
per-handler status, timings, and logs.
- ConfigContext: lightweight context passed to handlers providing
in_progress(), complete(), fail(), log(), supplied_yaml(), and
add_dependent_ctx(). Safe no-op at startup when no reload is active.
- ConfigReloadProgress: periodic checker that detects stuck tasks and marks
them as TIMEOUT.
New traffic_ctl commands:
- config reload [-m] [-t <token>] [-d @file] [--force]
- config status [-t <token>] [-c all]
All commands support --format json for automation and CI pipelines.
New JSONRPC APIs:
- admin_config_reload: unified file-based or inline reload with token,
force, and configs parameters.
- get_reload_config_status: query reload status by token or get the last N
reloads.
Migrated config handlers to ConfigRegistry: ip_allow, cache_control,
cache_hosting, parent_proxy, split_dns, remap, logging, ssl_client_coordinator
(with sni.yaml and ssl_multicert.config as dependencies), ssl_ticket_key,
records, and pre-warm. Static configs (storage, volume, plugin, socks, jsonrpc)
registered as inventory-only.
Removed legacy ConfigUpdateHandler/ConfigUpdateContinuation from
ConfigProcessor.h. Removed AddConfigFilesHere.cc in favor of per-module
self-registration.
Fixed duplicate handler execution for configs with multiple trigger records
(e.g. ssl_client_coordinator) by deduplicating against the ConfigReloadTask
subtask tree.
Added RecFlushConfigUpdateCbs() to synchronously fire pending record
callbacks after rereadConfig(), ensuring all subtasks are registered before the
first status poll.
New configuration records:
- proxy.config.admin.reload.timeout (default: 1h)
- proxy.config.admin.reload.check_interval (default: 2s)
Backward compatible: existing `traffic_ctl config reload` works as before;
internally it now uses the new framework with automatic token assignment and
tracking.
(cherry picked from commit 5bab268cb4c22e338d63a81f5da621a6b90776e6)
Conflicts:
include/tscore/ArgParser.h
src/iocore/cache/P_CacheHosting.h
src/iocore/hostdb/CMakeLists.txt
src/proxy/ReverseProxy.cc
src/records/CMakeLists.txt
src/tscore/ArgParser.cc
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]