This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 96474959dd origin_server_auth: Improve log messages (#13553)
96474959dd is described below
commit 96474959dd0131b9d2d2c7942e51f4a0cb0034a9
Author: Masakazu Kitajo <[email protected]>
AuthorDate: Tue Aug 18 11:03:36 2026 -0600
origin_server_auth: Improve log messages (#13553)
* origin_server_auth: Improve an error message
The original message didn't say what could be wrong at all.
What manual reloading mean is unclear and it's not always the right action.
* Add the getter
* Update more messages
---
plugins/origin_server_auth/origin_server_auth.cc | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/plugins/origin_server_auth/origin_server_auth.cc
b/plugins/origin_server_auth/origin_server_auth.cc
index e2eaaa9a1c..1866a90ac9 100644
--- a/plugins/origin_server_auth/origin_server_auth.cc
+++ b/plugins/origin_server_auth/origin_server_auth.cc
@@ -434,6 +434,12 @@ public:
return _conf_reload_count++;
}
+ int
+ get_conf_reload_count()
+ {
+ return _conf_reload_count;
+ }
+
int
incr_invalid_file_count()
{
@@ -715,7 +721,7 @@ ConfigCache::get(const char *fname)
unsigned update_status = it->second.update_status;
if (tv.tv_sec > (it->second.load_time + _ttl)) {
if (!(update_status & 1) &&
it->second.update_status.compare_exchange_strong(update_status, update_status +
1)) {
- Dbg(dbg_ctl, "Configuration from %s is stale, reloading",
config_fname.c_str());
+ Dbg(dbg_ctl, "Cached configuration from %s is stale, reloading",
config_fname.c_str());
s3 = new S3Config(false); // false == this config does not get the
continuation
if (s3->parse_config(config_fname)) {
@@ -744,7 +750,7 @@ ConfigCache::get(const char *fname)
s3 = it->second.config;
}
} else {
- Dbg(dbg_ctl, "Configuration from %s is fresh, reusing",
config_fname.c_str());
+ Dbg(dbg_ctl, "Cached configuration from %s is fresh, reusing",
config_fname.c_str());
s3 = it->second.config;
}
} else {
@@ -1179,8 +1185,8 @@ config_reloader(TSCont cont, TSEvent /* event ATS_UNUSED
*/, void *edata)
Dbg(dbg_ctl, "config expiration time for version: %s %s is in the past,
re-checking in 1 minute", s3->versionString(),
config_fname.c_str());
if (s3->incr_conf_reload_count() % 10 == 0) {
- TSError("[%s] tried to reload config automatically but failed, please
try manual reloading the config file: %s",
- PLUGIN_NAME, config_fname.c_str());
+ TSError("[%s] Reloading an expired config file has been failing (%d
attempts): %s", PLUGIN_NAME,
+ s3->get_conf_reload_count(), config_fname.c_str());
}
s3->schedule_conf_reload(60);
}