You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ro...@apache.org on 2021/05/04 17:27:44 UTC

[trafficcontrol] branch master updated: t3c: consider plugin config files to determine if remap.config needs to be touched (#5806)

This is an automated email from the ASF dual-hosted git repository.

rob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new a85e3cf  t3c: consider plugin config files to determine if remap.config needs to be touched (#5806)
a85e3cf is described below

commit a85e3cf1ede6aacfbcf84e2f3cf64ea73cd86c57
Author: Brian Olsen <bn...@gmail.com>
AuthorDate: Tue May 4 11:27:30 2021 -0600

    t3c: consider plugin config files to determine if remap.config needs to be touched (#5806)
---
 CHANGELOG.md                               |  1 +
 traffic_ops_ort/t3c/torequest/torequest.go | 14 +++++++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index e82b7ee..78a2a3d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -38,6 +38,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
 - Added asynchronous status to ACME certificate generation.
 - Added headers to Traffic Portal, Traffic Ops, and Traffic Monitor to opt out of tracking users via Google FLoC.
 - `DELETE` request method for `deliveryservices/xmlId/{name}/urlkeys` and `deliveryservices/{id}/urlkeys`.
+- t3c: bug fix to consider plugin config files for reloading remap.config
 
 ### Fixed
 - [#5690](https://github.com/apache/trafficcontrol/issues/5690) - Fixed github action for added/modified db migration file.
diff --git a/traffic_ops_ort/t3c/torequest/torequest.go b/traffic_ops_ort/t3c/torequest/torequest.go
index fe23f08..2b2b219 100644
--- a/traffic_ops_ort/t3c/torequest/torequest.go
+++ b/traffic_ops_ort/t3c/torequest/torequest.go
@@ -687,19 +687,23 @@ func (r *TrafficOpsReq) replaceCfgFile(cfg *ConfigFile) error {
 		}
 		cfg.ChangeApplied = true
 
-		r.TrafficCtlReload = r.TrafficCtlReload ||
-			strings.HasSuffix(cfg.Dir, "trafficserver") ||
-			cfg.RemapPluginConfig ||
+		r.RemapConfigReload = cfg.RemapPluginConfig ||
 			cfg.Name == "remap.config" ||
-			cfg.Name == "ssl_multicert.config" ||
 			strings.HasPrefix(cfg.Name, "url_sig_") ||
 			strings.HasPrefix(cfg.Name, "uri_signing") ||
 			strings.HasPrefix(cfg.Name, "hdr_rw_") ||
+			strings.HasPrefix(cfg.Name, "regex_remap_") ||
+			strings.HasPrefix(cfg.Name, "bg_fetch") ||
+			strings.HasSuffix(cfg.Name, ".lua")
+
+		r.TrafficCtlReload = r.TrafficCtlReload ||
+			strings.HasSuffix(cfg.Dir, "trafficserver") ||
+			r.RemapConfigReload ||
+			cfg.Name == "ssl_multicert.config" ||
 			(strings.HasSuffix(cfg.Dir, "ssl") && strings.HasSuffix(cfg.Name, ".cer")) ||
 			(strings.HasSuffix(cfg.Dir, "ssl") && strings.HasSuffix(cfg.Name, ".key"))
 
 		r.TrafficServerRestart = cfg.Name == "plugin.config"
-		r.RemapConfigReload = cfg.RemapPluginConfig || cfg.Name == "remap.config"
 		r.NtpdRestart = cfg.Name == "ntpd.conf"
 		r.SysCtlReload = cfg.Name == "sysctl.conf"