From 01a6069d2ed07c50221b90201cd6f6c25aca1081 Mon Sep 17 00:00:00 2001 From: Masakazu Kitajo Date: Fri, 14 Aug 2026 14:58:50 -0600 Subject: [PATCH 1/3] 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. --- plugins/origin_server_auth/origin_server_auth.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/origin_server_auth/origin_server_auth.cc b/plugins/origin_server_auth/origin_server_auth.cc index e2eaaa9a1c9..e6803524284 100644 --- a/plugins/origin_server_auth/origin_server_auth.cc +++ b/plugins/origin_server_auth/origin_server_auth.cc @@ -1179,8 +1179,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 a stale config file has been failing (%d attempts): %s", PLUGIN_NAME, s3->incr_conf_reload_count(), + config_fname.c_str()); } s3->schedule_conf_reload(60); } From 0bfd8aa0e6c5086e51cb7e2bf61f7dcfcae5d4eb Mon Sep 17 00:00:00 2001 From: Masakazu Kitajo Date: Fri, 14 Aug 2026 15:14:09 -0600 Subject: [PATCH 2/3] Add the getter --- plugins/origin_server_auth/origin_server_auth.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/origin_server_auth/origin_server_auth.cc b/plugins/origin_server_auth/origin_server_auth.cc index e6803524284..f8a0d6d9b25 100644 --- a/plugins/origin_server_auth/origin_server_auth.cc +++ b/plugins/origin_server_auth/origin_server_auth.cc @@ -434,6 +434,12 @@ class S3Config return _conf_reload_count++; } + int + get_conf_reload_count() + { + return _conf_reload_count; + } + int incr_invalid_file_count() { @@ -1179,7 +1185,7 @@ 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] Reloading a stale config file has been failing (%d attempts): %s", PLUGIN_NAME, s3->incr_conf_reload_count(), + TSError("[%s] Reloading a stale config file has been failing (%d attempts): %s", PLUGIN_NAME, s3->get_conf_reload_count(), config_fname.c_str()); } s3->schedule_conf_reload(60); From a8729630ef664671e189c6a5dcdf0a13e200e373 Mon Sep 17 00:00:00 2001 From: Masakazu Kitajo Date: Fri, 14 Aug 2026 15:30:13 -0600 Subject: [PATCH 3/3] Update more messages --- plugins/origin_server_auth/origin_server_auth.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/origin_server_auth/origin_server_auth.cc b/plugins/origin_server_auth/origin_server_auth.cc index f8a0d6d9b25..1866a90ac9a 100644 --- a/plugins/origin_server_auth/origin_server_auth.cc +++ b/plugins/origin_server_auth/origin_server_auth.cc @@ -721,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)) { @@ -750,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 { @@ -1185,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] Reloading a stale config file has been failing (%d attempts): %s", PLUGIN_NAME, s3->get_conf_reload_count(), - 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); }