You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by zr...@apache.org on 2021/09/21 22:08:51 UTC

[trafficcontrol] branch 6.0.x updated (0449f0b -> c97f45a)

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

zrhoffman pushed a change to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git.


    from 0449f0b  Walk back deprecation of TO APIv3, add instability warnings for 4.0 (#6209)
     new 4d6272b  Increasing astats string buffer size. We have seen astats config ip lists going beyond the existing 1k limit and being truncated. There is a proper rewrite on the way but this temporary fix can suffice for a while (#6212)
     new c89911f  Fixed crs/stats fields to report time correctly and not overflow and … (#6211)
     new 803d75c  update print statements in t3c to use go logger library (#6052)
     new 3c1aaa4  Fix grid comp issues (#6222)
     new e2e06c6  Fix enroller build issues (#6227)
     new 66891d1  Remove t3c debug print (#6207)
     new 675de07  Le regex fix (#6184)
     new a19cf75  Update link to join #traffic-control on the ASF slack
     new c97f45a  Compile ToDnssecRefresh binary into TO rpm, update cron job to use it (#6224)

The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/ISSUE_TEMPLATE/1-bug-report.md             |  2 +-
 .github/ISSUE_TEMPLATE/2-feature-request.md        |  2 +-
 .github/ISSUE_TEMPLATE/3-improvement-request.md    |  2 +-
 .github/ISSUE_TEMPLATE/config.yml                  |  2 +-
 CHANGELOG.md                                       |  3 ++
 cache-config/t3c-apply/config/config.go            | 14 ++++---
 cache-config/t3c-apply/t3c-apply.go                |  2 +-
 cache-config/t3c-apply/torequest/torequest.go      |  2 +-
 cache-config/t3c-check/t3c-check.go                | 13 ++++---
 cache-config/t3c-diff/t3c-diff.go                  | 15 ++++----
 cache-config/t3c-generate/plugin/plugin.go         |  5 ++-
 cache-config/t3c-generate/t3c-generate.go          |  2 +-
 .../update-to-client/update-to-client.go           | 10 +++--
 cache-config/t3c-request/config/config.go          | 24 ++++++------
 cache-config/t3c/t3c.go                            | 13 ++++---
 cache-config/t3cutil/toreq/client.go               |  1 -
 docs/source/faq.rst                                |  2 +-
 infrastructure/cdn-in-a-box/enroller/Dockerfile    |  8 ++--
 lib/go-tc/crsstats.go                              | 36 +----------------
 ...1090914220900_le_dns_challenge_xml_id.down.sql} |  2 +-
 ...021090914220900_le_dns_challenge_xml_id.up.sql} |  2 +-
 traffic_ops/build/build_rpm.sh                     |  5 +++
 traffic_ops/build/traffic_ops.spec                 | 13 +++++++
 traffic_ops/etc/cron.d/trafops_dnssec_refresh      |  3 +-
 .../traffic_ops_golang/deliveryservice/acme.go     | 12 +++---
 .../deliveryservice/acme_renew.go                  |  2 +-
 .../deliveryservice/letsencrypt_dns_challenge.go   |  5 ++-
 .../modules/table/agGrid/CommonGridController.js   |  4 +-
 .../core/ds/LetsEncryptDnsChallenge.java           | 16 +++++++-
 .../core/ds/LetsEncryptDnsChallengeWatcher.java    | 45 +++++++++++-----------
 .../traffic_router/core/router/StatTracker.java    | 21 +++++++++-
 .../plugins/astats_over_http/astats_over_http.c    |  2 +-
 32 files changed, 161 insertions(+), 129 deletions(-)
 copy traffic_ops/app/db/migrations/{2021021900000000_cdn_notification.down.sql => 2021090914220900_le_dns_challenge_xml_id.down.sql} (93%)
 copy traffic_ops/app/db/migrations/{2021021900000000_cdn_notification.down.sql => 2021090914220900_le_dns_challenge_xml_id.up.sql} (93%)

[trafficcontrol] 02/09: Fixed crs/stats fields to report time correctly and not overflow and … (#6211)

Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit c89911f7ff59be3c132d128687b3f696f4e33f73
Author: mattjackson220 <33...@users.noreply.github.com>
AuthorDate: Wed Sep 15 10:18:56 2021 -0600

    Fixed crs/stats fields to report time correctly and not overflow and … (#6211)
    
    * Fixed crs/stats fields to report time correctly and not overflow and removed unused fields from TO
    
    * fixed spaces
    
    (cherry picked from commit 296051a1fa8ae36d3f38bd08e2dde929dd80a361)
---
 CHANGELOG.md                                       |  1 +
 lib/go-tc/crsstats.go                              | 36 ++--------------------
 .../traffic_router/core/router/StatTracker.java    | 21 ++++++++++++-
 3 files changed, 23 insertions(+), 35 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1e6e20f..0e01602 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -105,6 +105,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
 - [#6174](https://github.com/apache/trafficcontrol/issues/6174) - Fixed t3c-apply with no hostname failing if the OS hostname returns a full FQDN
 - Fixed Federations IMS so TR federations watcher will get updates.
 - [#5129](https://github.com/apache/trafficcontrol/issues/5129) - Updated TM so that it returns a 404 if the endpoint is not supported.
+- Fixed Traffic Router crs/stats to prevent overflow and to correctly record the time used in averages.
 
 ### Changed
 - Migrated completely off of bower in favor of npm
diff --git a/lib/go-tc/crsstats.go b/lib/go-tc/crsstats.go
index 11e56d9..945b66c 100644
--- a/lib/go-tc/crsstats.go
+++ b/lib/go-tc/crsstats.go
@@ -36,15 +36,8 @@ type CRSStatsApp struct {
 
 // CRSStatsStats represents stats about a given TR.
 type CRSStatsStats struct {
-	DNSMap           map[string]CRSStatsStat
-	HTTPMap          map[string]CRSStatsStat
-	TotalDNSCount    uint64                `json:"totalDnsCount"`
-	TotalHTTPCount   uint64                `json:"totalHttpCount"`
-	TotalDSMissCount uint64                `json:"totalDsMissCount"`
-	AppStartTime     uint64                `json:"appStartTime"`
-	AverageDnsTime   uint64                `json:"averageDnsTime"`
-	AverageHttpTime  uint64                `json:"averageHttpTime"`
-	UpdateTracker    CRSStatsUpdateTracker `json:"updateTracker"`
+	DNSMap  map[string]CRSStatsStat
+	HTTPMap map[string]CRSStatsStat
 }
 
 // CRSStatsStat represents an individual stat.
@@ -61,31 +54,6 @@ type CRSStatsStat struct {
 	RegionalAlternateCount uint64 `json:"regionalAlternateCount"`
 }
 
-// CRSStatsUpdateTracker is a collection of miscellaneous statistics about a
-// Traffic Router instance.
-//
-// This is named with "CRS" because of legacy naming conventions for Traffic
-// Router.
-type CRSStatsUpdateTracker struct {
-	LastHttpsCertificatesCheck           uint64 `json:"lastHttpsCertificatesCheck"`
-	LastGeolocationDatabaseUpdaterUpdate uint64 `json:"lastGeolocationDatabaseUpdaterUpdate"`
-	LastCacheStateCheck                  uint64 `json:"lastCacheStateCheck"`
-	LastCacheStateChange                 uint64 `json:"lastCacheStateChange"`
-	LastNetworkUpdaterUpdate             uint64 `json:"lastNetworkUpdaterUpdate"`
-	LastHTTPSCertificatesUpdate          uint64 `json:"lastHttpsCertificatesUpdate"`
-	LastConfigCheck                      uint64 `json:"lastConfigCheck"`
-	LastConfigChange                     uint64 `json:"lastConfigChange"`
-	LastHTTPSCertificatesFetchFail       uint64 `json:"lastHttpsCertificatesFetchFail"`
-	LastNetworkUpdaterCheck              uint64 `json:"lastNetworkUpdaterCheck"`
-	NewDNSSECKeysFound                   uint64 `json:"newDnsSecKeysFound"`
-	LastGeolocationDatabaseUpdaterCheck  uint64 `json:"lastGeolocationDatabaseUpdaterCheck"`
-	LastHTTPSCertificatesFetchSuccess    uint64 `json:"lastHttpsCertificatesFetchSuccess"`
-	LastSteeringWatcherCheck             uint64 `json:"lastSteeringWatcherCheck"`
-	LastDNSSECKeysCheck                  uint64 `json:"lastDnsSecKeysCheck"`
-	LastFederationsWatcherCheck          uint64 `json:"lastFederationsWatcherCheck"`
-	LastHTTPSCertificatesFetchAttempt    uint64 `json:"lastHttpsCertificatesFetchAttempt"`
-}
-
 // Routing represents the aggregated routing percentages across CDNs or for a DS.
 type Routing struct {
 	StaticRoute       float64 `json:"staticRoute"`
diff --git a/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/router/StatTracker.java b/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/router/StatTracker.java
index b926a76..d93f62a 100644
--- a/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/router/StatTracker.java
+++ b/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/router/StatTracker.java
@@ -368,6 +368,11 @@ public class StatTracker {
 			if (t.routeType == RouteType.DNS) {
 				totalDnsCount++;
 				totalDnsTime += t.time;
+				if (totalDnsTime < 0 || totalDnsCount < 0) {
+					this.resetDnsStatsFromOverflow();
+					totalDnsCount++;
+					totalDnsTime += t.time;
+				}
 				map = dnsMap;
 
 				if (t.resultDetails == Track.ResultDetails.LOCALIZED_DNS) {
@@ -377,6 +382,11 @@ public class StatTracker {
 			} else {
 				totalHttpCount++;
 				totalHttpTime += t.time;
+				if (totalHttpTime < 0 || totalHttpCount < 0) {
+					this.resetHttpStatsFromOverflow();
+					totalHttpCount++;
+					totalHttpTime += t.time;
+				}
 				map = httpMap;
 			}
 			map.putIfAbsent(fqdn, new Tallies());
@@ -452,11 +462,20 @@ public class StatTracker {
 
 					t.setRouteType(rt, dsName.toString());
 					t.setResult(ResultType.INIT);
-					t.end();
 
 					saveTrack(t);
 				}
 			}
 		}
 	}
+
+	private void resetHttpStatsFromOverflow() {
+		totalHttpCount = 0;
+		totalHttpTime = 0;
+	}
+
+	private void resetDnsStatsFromOverflow() {
+		totalDnsCount = 0;
+		totalDnsTime = 0;
+	}
 }

[trafficcontrol] 03/09: update print statements in t3c to use go logger library (#6052)

Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 803d75c29303ef99258a3150e19e49449e47ede2
Author: Joe Pappano <jo...@cable.comcast.com>
AuthorDate: Thu Sep 16 15:52:56 2021 -0400

    update print statements in t3c to use go logger library (#6052)
    
    * Updated print statements to use go logging library for Maple.
    
    * Updated print statements to use go logging library for Maple.
    
    * Put print statement back and changed other log statement to print. Moved comment to top of func.
    
    * Removed unused func
    
    * Put back to print highly unlikely--version calls will ever need run thru a log parser.
    
    * Changed to be single new line.
    
    * Changed back to fmt.Println.
    
    * Added log.Init
    
    * Changed back to fmt.Fprintf()
    
    * Put info log strings into an array and will print them once loggers are initialized.
    
    * fixed formatting errors
    
    (cherry picked from commit 9766956ee96fbc9e66896ce2865de6e9cf7c15c7)
---
 cache-config/t3c-apply/config/config.go            | 14 ++++++++-----
 cache-config/t3c-apply/t3c-apply.go                |  2 +-
 cache-config/t3c-apply/torequest/torequest.go      |  2 +-
 cache-config/t3c-check/t3c-check.go                | 13 ++++++------
 cache-config/t3c-diff/t3c-diff.go                  | 15 +++++++-------
 cache-config/t3c-generate/plugin/plugin.go         |  5 +++--
 cache-config/t3c-generate/t3c-generate.go          |  2 +-
 .../update-to-client/update-to-client.go           | 10 +++++----
 cache-config/t3c-request/config/config.go          | 24 +++++++++++-----------
 cache-config/t3c/t3c.go                            | 13 ++++++------
 10 files changed, 55 insertions(+), 45 deletions(-)

diff --git a/cache-config/t3c-apply/config/config.go b/cache-config/t3c-apply/config/config.go
index ba33260..1c4f416 100644
--- a/cache-config/t3c-apply/config/config.go
+++ b/cache-config/t3c-apply/config/config.go
@@ -215,6 +215,7 @@ func GetTSPackageHome() string {
 
 func GetCfg() (Cfg, error) {
 	var err error
+	toInfoLog := []string{}
 
 	cacheHostNamePtr := getopt.StringLong("cache-host-name", 'H', "", "Host name of the cache to generate config for. Must be the server host name in Traffic Ops, not a URL, and not the FQDN")
 	retriesPtr := getopt.IntLong("num-retries", 'r', 3, "[number] retry connection to Traffic Ops URL [number] times, default is 3")
@@ -418,18 +419,18 @@ If any of the related flags are also set, they override the mode's default behav
 	var tsHome = ""
 	if *tsHomePtr != "" {
 		tsHome = *tsHomePtr
-		fmt.Printf("set TSHome from command line: '%s'\n\n", TSHome)
+		toInfoLog = append(toInfoLog, fmt.Sprintf("set TSHome from command line: '%s'", TSHome))
 	}
 	if *tsHomePtr == "" { // evironment or rpm check.
 		tsHome = os.Getenv("TS_HOME") // check for the environment variable.
 		if tsHome != "" {
-			fmt.Printf("set TSHome from TS_HOME environment variable '%s'\n", TSHome)
+			toInfoLog = append(toInfoLog, fmt.Sprintf("set TSHome from TS_HOME environment variable '%s'\n", TSHome))
 		} else { // finally check using the config file listing from the rpm package.
 			tsHome = GetTSPackageHome()
 			if tsHome != "" {
-				fmt.Printf("set TSHome from the RPM config file  list '%s'\n", tsHome)
+				toInfoLog = append(toInfoLog, fmt.Sprintf("set TSHome from the RPM config file  list '%s'\n", TSHome))
 			} else {
-				fmt.Printf("no override for TSHome was found, using the configured default: '%s'\n", TSHome)
+				toInfoLog = append(toInfoLog, fmt.Sprintf("no override for TSHome was found, using the configured default: '%s'\n", TSHome))
 			}
 		}
 	}
@@ -439,7 +440,7 @@ If any of the related flags are also set, they override the mode's default behav
 	if tsHome != "" {
 		TSHome = tsHome
 		tsConfigDir = tsHome + "/etc/trafficserver"
-		fmt.Printf("TSHome: %s, TSConfigDir: %s\n", TSHome, tsConfigDir)
+		toInfoLog = append(toInfoLog, fmt.Sprintf("TSHome: %s, TSConfigDir: %s\n", TSHome, tsConfigDir))
 	}
 
 	usageStr := "basic usage: t3c-apply --traffic-ops-url=myurl --traffic-ops-user=myuser --traffic-ops-password=mypass --cache-host-name=my-cache"
@@ -512,6 +513,9 @@ If any of the related flags are also set, they override the mode's default behav
 	for _, str := range modeLogStrs {
 		log.Infoln(str)
 	}
+	for msg := range toInfoLog {
+		log.Infoln(msg)
+	}
 
 	printConfig(cfg)
 
diff --git a/cache-config/t3c-apply/t3c-apply.go b/cache-config/t3c-apply/t3c-apply.go
index e0cc6fd..ba75326 100644
--- a/cache-config/t3c-apply/t3c-apply.go
+++ b/cache-config/t3c-apply/t3c-apply.go
@@ -110,7 +110,7 @@ func main() {
 		}
 	}
 
-	fmt.Println(time.Now().Format(time.UnixDate))
+	log.Infoln(time.Now().Format(time.UnixDate))
 
 	if !util.CheckUser(cfg) {
 		lock.UnlockAndExit(UserCheckError)
diff --git a/cache-config/t3c-apply/torequest/torequest.go b/cache-config/t3c-apply/torequest/torequest.go
index 7763fbb..f106471 100644
--- a/cache-config/t3c-apply/torequest/torequest.go
+++ b/cache-config/t3c-apply/torequest/torequest.go
@@ -160,7 +160,7 @@ func unencodeFilter(body []string) []string {
 // DumpConfigFiles is used for debugging
 func (r *TrafficOpsReq) DumpConfigFiles() {
 	for _, cfg := range r.configFiles {
-		fmt.Printf("Name: %s, Dir: %s, Service: %s\n",
+		log.Infof("Name: %s, Dir: %s, Service: %s\n",
 			cfg.Name, cfg.Dir, cfg.Service)
 	}
 }
diff --git a/cache-config/t3c-check/t3c-check.go b/cache-config/t3c-check/t3c-check.go
index f46fdfa..1cf0b94 100644
--- a/cache-config/t3c-check/t3c-check.go
+++ b/cache-config/t3c-check/t3c-check.go
@@ -20,7 +20,7 @@ package main
  */
 
 import (
-	"fmt"
+	"github.com/apache/trafficcontrol/lib/go-log"
 	"os"
 	"os/exec"
 	"syscall" // TODO change to x/unix ?
@@ -43,19 +43,20 @@ const ExitCodeCommandLookupErr = 5
 func main() {
 	flagHelp := getopt.BoolLong("help", 'h', "Print usage information and exit")
 	getopt.Parse()
+	log.Init(os.Stderr, os.Stderr, os.Stderr, os.Stderr, os.Stderr)
 	if *flagHelp {
-		fmt.Println(usageStr())
+		log.Errorln(usageStr())
 		os.Exit(ExitCodeSuccess)
 	}
 
 	if len(os.Args) < 2 {
-		fmt.Fprintf(os.Stderr, "no command\n\n"+usageStr())
+		log.Errorf("no command\n\n" + usageStr())
 		os.Exit(ExitCodeNoCommand)
 	}
 
 	cmd := os.Args[1]
 	if _, ok := commands[cmd]; !ok {
-		fmt.Fprintf(os.Stderr, "unknown command\n") // TODO print usage
+		log.Errorf("unknown command\n%s", usageStr())
 		os.Exit(ExitCodeUnknownCommand)
 	}
 
@@ -63,7 +64,7 @@ func main() {
 
 	appPath, err := exec.LookPath(app)
 	if err != nil {
-		fmt.Fprintf(os.Stderr, "error finding path to '"+app+"': "+err.Error())
+		log.Errorf("error finding path to '%s': %s\n", app, err.Error())
 		os.Exit(ExitCodeCommandLookupErr)
 	}
 
@@ -72,7 +73,7 @@ func main() {
 	env := os.Environ()
 
 	if err := syscall.Exec(appPath, args, env); err != nil {
-		fmt.Fprintf(os.Stderr, "error executing sub-command: "+err.Error()+"\n")
+		log.Errorf("error executing sub-command: %s\n", err.Error())
 		os.Exit(ExitCodeCommandErr)
 	}
 }
diff --git a/cache-config/t3c-diff/t3c-diff.go b/cache-config/t3c-diff/t3c-diff.go
index 0686a58..854047f 100644
--- a/cache-config/t3c-diff/t3c-diff.go
+++ b/cache-config/t3c-diff/t3c-diff.go
@@ -21,7 +21,7 @@ package main
 
 import (
 	"errors"
-	"fmt"
+	"github.com/apache/trafficcontrol/lib/go-log"
 	"io/ioutil"
 	"os"
 	"regexp"
@@ -35,13 +35,14 @@ import (
 func main() {
 	help := getopt.BoolLong("help", 'h', "Print usage info and exit")
 	getopt.ParseV2()
+	log.Init(os.Stderr, os.Stderr, os.Stderr, os.Stderr, os.Stderr)
 	if *help {
-		fmt.Println(usageStr)
+		log.Errorln(usageStr)
 		os.Exit(0)
 	}
 
 	if len(os.Args) < 3 {
-		fmt.Println(usageStr)
+		log.Errorln(usageStr)
 		os.Exit(3)
 	}
 
@@ -49,18 +50,18 @@ func main() {
 	fileNameB := strings.TrimSpace(os.Args[2])
 
 	if len(fileNameA) == 0 || len(fileNameB) == 0 {
-		fmt.Println(usageStr)
+		log.Errorln(usageStr)
 		os.Exit(4)
 	}
 
 	fileA, fileAExisted, err := readFileOrStdin(fileNameA)
 	if err != nil {
-		fmt.Fprintf(os.Stderr, "error reading first: "+err.Error())
+		log.Errorf("error reading first: %s\n", err.Error())
 		os.Exit(5)
 	}
 	fileB, fileBExisted, err := readFileOrStdin(fileNameB)
 	if err != nil {
-		fmt.Fprintf(os.Stderr, "error reading second: "+err.Error())
+		log.Errorf("error reading second: %s\n", err.Error())
 		os.Exit(6)
 	}
 
@@ -80,7 +81,7 @@ func main() {
 		match := regexp.MustCompile(`(?m)^\+.*|^-.*`)
 		changes := diff.Diff(fileA, fileB)
 		for _, change := range match.FindAllString(changes, -1) {
-			fmt.Println(change)
+			log.Infoln(change)
 		}
 		os.Exit(1)
 	}
diff --git a/cache-config/t3c-generate/plugin/plugin.go b/cache-config/t3c-generate/plugin/plugin.go
index 245d21a..50c6d97 100644
--- a/cache-config/t3c-generate/plugin/plugin.go
+++ b/cache-config/t3c-generate/plugin/plugin.go
@@ -57,14 +57,15 @@ type Plugins interface {
 }
 
 func AddPlugin(priority uint64, funcs Funcs) {
+	// print used here, because this is called in init, loggers don't exist yet
 	_, filename, _, ok := runtime.Caller(1)
 	if !ok {
-		fmt.Println(time.Now().Format(time.RFC3339Nano) + " Error plugin.AddPlugin: runtime.Caller failed, can't get plugin names") // print, because this is called in init, loggers don't exist yet
+		fmt.Println(time.Now().Format(time.RFC3339Nano) + " Error plugin.AddPlugin: runtime.Caller failed, can't get plugin names")
 		os.Exit(1)
 	}
 
 	pluginName := strings.TrimSuffix(path.Base(filename), ".go")
-	log.Infoln("AddPlugin adding " + pluginName)
+	fmt.Println("AddPlugin adding " + pluginName)
 	initPlugins = append(initPlugins, pluginObj{funcs: funcs, priority: priority, name: pluginName})
 }
 
diff --git a/cache-config/t3c-generate/t3c-generate.go b/cache-config/t3c-generate/t3c-generate.go
index 3e8966e..7059a57 100644
--- a/cache-config/t3c-generate/t3c-generate.go
+++ b/cache-config/t3c-generate/t3c-generate.go
@@ -43,7 +43,7 @@ func main() {
 	}
 
 	if cfg.ListPlugins {
-		fmt.Println(strings.Join(plugin.List(), "\n"))
+		log.Errorln(strings.Join(plugin.List(), "\n"))
 		os.Exit(0)
 	}
 
diff --git a/cache-config/t3c-generate/update-to-client/update-to-client.go b/cache-config/t3c-generate/update-to-client/update-to-client.go
index 30fa764..91098e6 100644
--- a/cache-config/t3c-generate/update-to-client/update-to-client.go
+++ b/cache-config/t3c-generate/update-to-client/update-to-client.go
@@ -22,6 +22,7 @@ package main
 import (
 	"errors"
 	"fmt"
+	"github.com/apache/trafficcontrol/lib/go-log"
 	"io/ioutil"
 	"os"
 	"os/exec"
@@ -31,8 +32,9 @@ import (
 )
 
 func main() {
+	log.Init(os.Stderr, os.Stderr, os.Stderr, os.Stderr, os.Stderr)
 	if len(os.Args) < 3 {
-		fmt.Fprintf(os.Stdout, usageStr())
+		log.Errorln(usageStr())
 		os.Exit(0)
 	}
 	dir := os.Args[1]
@@ -40,18 +42,18 @@ func main() {
 
 	workingDir, err := os.Getwd()
 	if err != nil {
-		fmt.Fprintf(os.Stderr, "Error getting working directory: "+err.Error()+"\n")
+		log.Errorf("Error getting working directory: %s\n", err.Error())
 		os.Exit(1)
 	}
 
 	dir = filepath.Join(workingDir, dir) // make the given directory absolute
 
 	if err := updateVendoredTOClient(dir, branch); err != nil {
-		fmt.Fprintf(os.Stderr, "Error updating vendored client: "+err.Error()+"\n")
+		log.Errorf("Error updating vendored client: %s\n", err.Error())
 		os.Exit(1)
 	}
 	if err := updateNewClientUsage(dir); err != nil {
-		fmt.Fprintf(os.Stderr, "Error updating new client usage: "+err.Error()+"\n")
+		log.Errorf("Error updating new client usage: %s\n", err.Error())
 		os.Exit(1)
 	}
 	os.Exit(0)
diff --git a/cache-config/t3c-request/config/config.go b/cache-config/t3c-request/config/config.go
index 27076dd..68da602 100644
--- a/cache-config/t3c-request/config/config.go
+++ b/cache-config/t3c-request/config/config.go
@@ -178,18 +178,18 @@ func InitConfig() (Cfg, error) {
 }
 
 func (cfg Cfg) PrintConfig() {
-	fmt.Printf("CommandArgs: %s\n", cfg.CommandArgs)
-	fmt.Printf("LogLocationDebug: %s\n", cfg.LogLocationDebug)
-	fmt.Printf("LogLocationError: %s\n", cfg.LogLocationError)
-	fmt.Printf("LogLocationInfo: %s\n", cfg.LogLocationInfo)
-	fmt.Printf("LogLocationWarn: %s\n", cfg.LogLocationWarn)
-	fmt.Printf("LoginDispersion : %s\n", cfg.LoginDispersion)
-	fmt.Printf("CacheHostName: %s\n", cfg.CacheHostName)
-	fmt.Printf("TOInsecure: %v\n", cfg.TOInsecure)
-	fmt.Printf("TOTimeoutMS: %s\n", cfg.TOTimeoutMS)
-	fmt.Printf("TOUser: %s\n", cfg.TOUser)
-	fmt.Printf("TOPass: xxxxxx\n")
-	fmt.Printf("TOURL: %s\n", cfg.TOURL)
+	log.Debugf("CommandArgs: %s\n", cfg.CommandArgs)
+	log.Debugf("LogLocationDebug: %s\n", cfg.LogLocationDebug)
+	log.Debugf("LogLocationError: %s\n", cfg.LogLocationError)
+	log.Debugf("LogLocationInfo: %s\n", cfg.LogLocationInfo)
+	log.Debugf("LogLocationWarn: %s\n", cfg.LogLocationWarn)
+	log.Debugf("LoginDispersion : %s\n", cfg.LoginDispersion)
+	log.Debugf("CacheHostName: %s\n", cfg.CacheHostName)
+	log.Debugf("TOInsecure: %v\n", cfg.TOInsecure)
+	log.Debugf("TOTimeoutMS: %s\n", cfg.TOTimeoutMS)
+	log.Debugf("TOUser: %s\n", cfg.TOUser)
+	log.Debugf("TOPass: xxxxxx\n")
+	log.Debugf("TOURL: %s\n", cfg.TOURL)
 }
 
 func LoadOldCfg(path string) (*t3cutil.ConfigData, error) {
diff --git a/cache-config/t3c/t3c.go b/cache-config/t3c/t3c.go
index 8a71406..e59bbd3 100644
--- a/cache-config/t3c/t3c.go
+++ b/cache-config/t3c/t3c.go
@@ -20,7 +20,7 @@ package main
  */
 
 import (
-	"fmt"
+	"github.com/apache/trafficcontrol/lib/go-log"
 	"os"
 	"os/exec"
 	"syscall" // TODO change to x/unix ?
@@ -48,19 +48,20 @@ const ExitCodeCommandLookupErr = 5
 func main() {
 	flagHelp := getopt.BoolLong("help", 'h', "Print usage information and exit")
 	getopt.Parse()
+	log.Init(os.Stderr, os.Stderr, os.Stderr, os.Stderr, os.Stderr)
 	if *flagHelp {
-		fmt.Println(usageStr())
+		log.Errorln(usageStr())
 		os.Exit(ExitCodeSuccess)
 	}
 
 	if len(os.Args) < 2 {
-		fmt.Fprintf(os.Stderr, "no command\n\n"+usageStr())
+		log.Errorf("no command\n\n%s", usageStr())
 		os.Exit(ExitCodeNoCommand)
 	}
 
 	cmd := os.Args[1]
 	if _, ok := commands[cmd]; !ok {
-		fmt.Fprintf(os.Stderr, "unknown command\n") // TODO print usage
+		log.Errorf("unknown command\n%s", usageStr())
 		os.Exit(ExitCodeUnknownCommand)
 	}
 
@@ -68,7 +69,7 @@ func main() {
 
 	appPath, err := exec.LookPath(app)
 	if err != nil {
-		fmt.Fprintf(os.Stderr, "error finding path to '"+app+"': "+err.Error())
+		log.Errorf("error finding path to '%s': %s\n", app, err.Error())
 		os.Exit(ExitCodeCommandLookupErr)
 	}
 
@@ -77,7 +78,7 @@ func main() {
 	env := os.Environ()
 
 	if err := syscall.Exec(appPath, args, env); err != nil {
-		fmt.Fprintf(os.Stderr, "error executing sub-command '"+appPath+"': "+err.Error()+"\n")
+		log.Errorf("error executing sub-command '%s': %s\n", appPath, err.Error())
 		os.Exit(ExitCodeCommandErr)
 	}
 }

[trafficcontrol] 07/09: Le regex fix (#6184)

Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 675de0795e06af90d9dacf3de6561d1a232fb1d4
Author: mattjackson220 <33...@users.noreply.github.com>
AuthorDate: Mon Sep 20 16:11:38 2021 -0600

    Le regex fix (#6184)
    
    * Lets Encrypt updated for domains that don't contain the xmlid
    
    * updated changelog
    
    (cherry picked from commit 14d8d8ecc1660c183afc36678cc55d73dc9a9aa6)
---
 CHANGELOG.md                                       |  1 +
 ...21090914220900_le_dns_challenge_xml_id.down.sql | 18 +++++++++
 ...2021090914220900_le_dns_challenge_xml_id.up.sql | 18 +++++++++
 .../traffic_ops_golang/deliveryservice/acme.go     | 12 +++---
 .../deliveryservice/acme_renew.go                  |  2 +-
 .../deliveryservice/letsencrypt_dns_challenge.go   |  5 ++-
 .../core/ds/LetsEncryptDnsChallenge.java           | 16 +++++++-
 .../core/ds/LetsEncryptDnsChallengeWatcher.java    | 45 +++++++++++-----------
 8 files changed, 84 insertions(+), 33 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e01602..1fd6704 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -106,6 +106,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
 - Fixed Federations IMS so TR federations watcher will get updates.
 - [#5129](https://github.com/apache/trafficcontrol/issues/5129) - Updated TM so that it returns a 404 if the endpoint is not supported.
 - Fixed Traffic Router crs/stats to prevent overflow and to correctly record the time used in averages.
+- [#6093](https://github.com/apache/trafficcontrol/issues/6093) - Fixed Let's Encrypt to work for delivery services where the domain does not contain the XMLID.
 
 ### Changed
 - Migrated completely off of bower in favor of npm
diff --git a/traffic_ops/app/db/migrations/2021090914220900_le_dns_challenge_xml_id.down.sql b/traffic_ops/app/db/migrations/2021090914220900_le_dns_challenge_xml_id.down.sql
new file mode 100644
index 0000000..d2e7e61
--- /dev/null
+++ b/traffic_ops/app/db/migrations/2021090914220900_le_dns_challenge_xml_id.down.sql
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership.  The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+ALTER TABLE dnschallenges DROP COLUMN IF EXISTS xml_id;
diff --git a/traffic_ops/app/db/migrations/2021090914220900_le_dns_challenge_xml_id.up.sql b/traffic_ops/app/db/migrations/2021090914220900_le_dns_challenge_xml_id.up.sql
new file mode 100644
index 0000000..64df6a0
--- /dev/null
+++ b/traffic_ops/app/db/migrations/2021090914220900_le_dns_challenge_xml_id.up.sql
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership.  The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+ALTER TABLE dnschallenges ADD COLUMN xml_id text NOT NULL;
diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/acme.go b/traffic_ops/traffic_ops_golang/deliveryservice/acme.go
index 044a466..e89b8e6 100644
--- a/traffic_ops/traffic_ops_golang/deliveryservice/acme.go
+++ b/traffic_ops/traffic_ops_golang/deliveryservice/acme.go
@@ -82,7 +82,8 @@ func (u *MyUser) GetPrivateKey() crypto.PrivateKey {
 
 // DNSProviderTrafficRouter is used in the lego library and contains a database in order to store the DNS challenges for ACME protocol.
 type DNSProviderTrafficRouter struct {
-	db *sqlx.DB
+	db    *sqlx.DB
+	xmlId *string
 }
 
 // NewDNSProviderTrafficRouter returns a new DNSProviderTrafficRouter object.
@@ -100,8 +101,8 @@ func (d *DNSProviderTrafficRouter) Present(domain, token, keyAuth string) error
 	tx, err := d.db.Begin()
 	fqdn, value := dns01.GetRecord(domain, keyAuth)
 
-	q := `INSERT INTO dnschallenges (fqdn, record) VALUES ($1, $2)`
-	response, err := tx.Exec(q, fqdn, value)
+	q := `INSERT INTO dnschallenges (fqdn, record, xml_id) VALUES ($1, $2, $3)`
+	response, err := tx.Exec(q, fqdn, value, *d.xmlId)
 	tx.Commit()
 	if err != nil {
 		log.Errorf("Inserting dns txt record for fqdn '" + fqdn + "' record '" + value + "': " + err.Error())
@@ -439,7 +440,7 @@ func GetAcmeCertificates(cfg *config.Config, req tc.DeliveryServiceAcmeSSLKeysRe
 		account = acmeAccount
 	}
 
-	client, err := GetAcmeClient(account, userTx, db)
+	client, err := GetAcmeClient(account, userTx, db, req.Key)
 	if err != nil {
 		log.Errorf("acme: getting acme client for provider %s: %v", provider, err)
 		api.CreateChangeLogRawTx(api.ApiChange, "DS: "+*req.DeliveryService+", ID: "+strconv.Itoa(dsID)+", ACTION: FAILED to add SSL keys with "+provider, currentUser, logTx)
@@ -560,7 +561,7 @@ func GetAcmeAccountConfig(cfg *config.Config, acmeProvider string) *config.Confi
 }
 
 // GetAcmeClient uses the ACME account information in either cdn.conf or the database to create and register an ACME client.
-func GetAcmeClient(acmeAccount *config.ConfigAcmeAccount, userTx *sql.Tx, db *sqlx.DB) (*lego.Client, error) {
+func GetAcmeClient(acmeAccount *config.ConfigAcmeAccount, userTx *sql.Tx, db *sqlx.DB, xmlId *string) (*lego.Client, error) {
 	if acmeAccount.UserEmail == "" {
 		log.Errorf("An email address must be provided to use ACME with %v", acmeAccount.AcmeProvider)
 		return nil, errors.New("An email address must be provided to use ACME with " + acmeAccount.AcmeProvider)
@@ -610,6 +611,7 @@ func GetAcmeClient(acmeAccount *config.ConfigAcmeAccount, userTx *sql.Tx, db *sq
 		client.Challenge.Remove(challenge.TLSALPN01)
 		trafficRouterDns := NewDNSProviderTrafficRouter()
 		trafficRouterDns.db = db
+		trafficRouterDns.xmlId = xmlId
 		if err != nil {
 			log.Errorf("Error creating Traffic Router DNS provider: %s", err.Error())
 			return nil, err
diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/acme_renew.go b/traffic_ops/traffic_ops_golang/deliveryservice/acme_renew.go
index 7b92526..eb7c78a 100644
--- a/traffic_ops/traffic_ops_golang/deliveryservice/acme_renew.go
+++ b/traffic_ops/traffic_ops_golang/deliveryservice/acme_renew.go
@@ -145,7 +145,7 @@ func renewAcmeCerts(cfg *config.Config, dsName string, ctx context.Context, http
 		return nil, errors.New("No acme account information in cdn.conf for " + keyObj.AuthType), http.StatusInternalServerError
 	}
 
-	client, err := GetAcmeClient(acmeAccount, userTx, db)
+	client, err := GetAcmeClient(acmeAccount, userTx, db, &dsName)
 	if err != nil {
 		api.CreateChangeLogRawTx(api.ApiChange, "DS: "+dsName+", ID: "+strconv.Itoa(*dsID)+", ACTION: FAILED to add SSL keys with "+acmeAccount.AcmeProvider, currentUser, logTx)
 		return nil, errors.New("getting acme client: " + err.Error()), http.StatusInternalServerError
diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/letsencrypt_dns_challenge.go b/traffic_ops/traffic_ops_golang/deliveryservice/letsencrypt_dns_challenge.go
index 45fb560..a9af8cd 100644
--- a/traffic_ops/traffic_ops_golang/deliveryservice/letsencrypt_dns_challenge.go
+++ b/traffic_ops/traffic_ops_golang/deliveryservice/letsencrypt_dns_challenge.go
@@ -33,6 +33,7 @@ import (
 type DnsRecord struct {
 	Fqdn   *string `json:"fqdn" db:"fqdn"`
 	Record *string `json:"record" db:"record"`
+	XmlId  *string `json:"xmlId" db:"xml_id"`
 }
 
 func GetDnsChallengeRecords(w http.ResponseWriter, r *http.Request) {
@@ -43,7 +44,7 @@ func GetDnsChallengeRecords(w http.ResponseWriter, r *http.Request) {
 	}
 	defer inf.Close()
 
-	getQuery := `SELECT fqdn, record FROM dnschallenges`
+	getQuery := `SELECT fqdn, record, xml_id FROM dnschallenges`
 
 	queryParamsToQueryCols := map[string]dbhelpers.WhereColumnInfo{
 		"fqdn": dbhelpers.WhereColumnInfo{Column: "fqdn"},
@@ -73,7 +74,7 @@ func getDnsRecords(tx *sqlx.Tx, getQuery string, queryValues map[string]interfac
 	defer rows.Close()
 	for rows.Next() {
 		record := DnsRecord{}
-		if err := rows.Scan(&record.Fqdn, &record.Record); err != nil {
+		if err := rows.Scan(&record.Fqdn, &record.Record, &record.XmlId); err != nil {
 			return nil, errors.New("scanning dns challenge records: " + err.Error())
 		}
 		records = append(records, record)
diff --git a/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/ds/LetsEncryptDnsChallenge.java b/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/ds/LetsEncryptDnsChallenge.java
index 8261ba0..2260825 100644
--- a/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/ds/LetsEncryptDnsChallenge.java
+++ b/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/ds/LetsEncryptDnsChallenge.java
@@ -26,6 +26,9 @@ public class LetsEncryptDnsChallenge {
     @JsonProperty
     private String record;
 
+    @JsonProperty
+    private String xmlId;
+
     public String getFqdn() {
         return fqdn;
     }
@@ -42,6 +45,14 @@ public class LetsEncryptDnsChallenge {
         this.record = record;
     }
 
+    public String getXmlId() {
+        return xmlId;
+    }
+
+    public void setXmlId(final String xmlId) {
+        this.xmlId = xmlId;
+    }
+
     @Override
     public boolean equals(final Object o) {
         if (this == o) {
@@ -52,11 +63,12 @@ public class LetsEncryptDnsChallenge {
         }
         final LetsEncryptDnsChallenge that = (LetsEncryptDnsChallenge) o;
         return fqdn.equals(that.fqdn) &&
-                record.equals(that.record);
+                record.equals(that.record) &&
+                xmlId.equals(that.xmlId);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(fqdn, record);
+        return Objects.hash(fqdn, record, xmlId);
     }
 }
diff --git a/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/ds/LetsEncryptDnsChallengeWatcher.java b/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/ds/LetsEncryptDnsChallengeWatcher.java
index 957bf06..5ebc89c 100644
--- a/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/ds/LetsEncryptDnsChallengeWatcher.java
+++ b/traffic_router/core/src/main/java/org/apache/traffic_control/traffic_router/core/ds/LetsEncryptDnsChallengeWatcher.java
@@ -31,6 +31,7 @@ import org.apache.log4j.Logger;
 import java.io.*;
 import java.time.Instant;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 
 public class LetsEncryptDnsChallengeWatcher extends AbstractResourceWatcher {
@@ -57,35 +58,33 @@ public class LetsEncryptDnsChallengeWatcher extends AbstractResourceWatcher {
 
 
             challengeList.forEach(challenge -> {
-                final StringBuilder sb = new StringBuilder();
-                sb.append(challenge.getFqdn());
-                if (!challenge.getFqdn().endsWith(".")) {
-                    sb.append('.');
+                final ObjectNode deliveryServiceConfig = (ObjectNode) deliveryServicesNode.get(challenge.getXmlId());
+                if (deliveryServiceConfig == null) {
+                    LOGGER.error("finding deliveryservice in cr-config for " + challenge.getXmlId());
+                    return;
                 }
-                final String challengeDomain = sb.toString();
-                final String fqdn = challengeDomain.substring(0, challengeDomain.length() - 1).replace("_acme-challenge.", "");
-
-                ObjectNode deliveryServiceConfig = null;
-                String dsLabel = "";
-                final StringBuilder nameSb = new StringBuilder();
-                nameSb.append("_acme-challenge");
-                for (final String label : fqdn.split("\\.")) {
-                    deliveryServiceConfig = (ObjectNode) deliveryServicesNode.get(label);
-                    if (deliveryServiceConfig != null) {
-                        dsLabel = label;
-                        break;
-                    } else {
-                        nameSb.append('.');
-                        nameSb.append(label);
-                    }
+
+                String staticEntryString = challenge.getFqdn();
+                final ArrayNode domains = (ArrayNode) deliveryServiceConfig.get("domains");
+                if (domains == null || domains.size() == 0) {
+                    LOGGER.error("no domains found in cr-config for deliveryservice " + challenge.getXmlId());
+                    return;
+                }
+
+                final Iterator<JsonNode> domainIter = domains.iterator();
+                while(domainIter.hasNext()) {
+                    final JsonNode domainNode = domainIter.next();
+                    staticEntryString = staticEntryString.replace(domainNode.asText() + ".", "");
                 }
 
-                final String name = nameSb.toString();
+                if (staticEntryString.endsWith(".")) {
+                    staticEntryString = staticEntryString.substring(0, staticEntryString.length() - 1);
+                }
 
-                final ArrayNode staticDnsEntriesNode = updateStaticEntries(challenge, name, mapper, deliveryServiceConfig);
+                final ArrayNode staticDnsEntriesNode = updateStaticEntries(challenge, staticEntryString, mapper, deliveryServiceConfig);
 
                 deliveryServiceConfig.set("staticDnsEntries", staticDnsEntriesNode);
-                deliveryServicesNode.set(dsLabel, deliveryServiceConfig);
+                deliveryServicesNode.set(challenge.getXmlId(), deliveryServiceConfig);
 
             });
 

[trafficcontrol] 08/09: Update link to join #traffic-control on the ASF slack

Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit a19cf75d2561d575d76f4a26445dcd18eddf2469
Author: Zach Hoffman <zr...@apache.org>
AuthorDate: Tue Sep 21 12:39:52 2021 -0600

    Update link to join #traffic-control on the ASF slack
    
    (cherry picked from commit 7996403d202dca849e8d10c9d745e273181ebd19)
---
 .github/ISSUE_TEMPLATE/1-bug-report.md          | 2 +-
 .github/ISSUE_TEMPLATE/2-feature-request.md     | 2 +-
 .github/ISSUE_TEMPLATE/3-improvement-request.md | 2 +-
 .github/ISSUE_TEMPLATE/config.yml               | 2 +-
 docs/source/faq.rst                             | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md
index c8b886c..fc588a4 100644
--- a/.github/ISSUE_TEMPLATE/1-bug-report.md
+++ b/.github/ISSUE_TEMPLATE/1-bug-report.md
@@ -26,7 +26,7 @@ If this issue identifies a security vulnerability, DO NOT submit it! Instead, co
 the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
 guidelines at https://apache.org/security regarding vulnerability disclosure.
 
-- For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/slack-invite)
+- For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/tc-slack-request)
 or the Traffic Control Users mailing list (send an email to users-subscribe@trafficcontrol.apache.org to subscribe).
 - Before submitting, please **SEARCH GITHUB** for a similar issue or PR
     * https://github.com/apache/trafficcontrol/issues
diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/2-feature-request.md
index ff6819d..d6223b2 100644
--- a/.github/ISSUE_TEMPLATE/2-feature-request.md
+++ b/.github/ISSUE_TEMPLATE/2-feature-request.md
@@ -26,7 +26,7 @@ If this issue identifies a security vulnerability, DO NOT submit it! Instead, co
 the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
 guidelines at https://apache.org/security regarding vulnerability disclosure.
 
-- For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/slack-invite)
+- For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/tc-slack-request)
 or the Traffic Control Users mailing list (send an email to users-subscribe@trafficcontrol.apache.org to subscribe).
 - Before submitting, please **SEARCH GITHUB** for a similar issue or PR
     * https://github.com/apache/trafficcontrol/issues
diff --git a/.github/ISSUE_TEMPLATE/3-improvement-request.md b/.github/ISSUE_TEMPLATE/3-improvement-request.md
index 9fd5205..b6f9d32 100644
--- a/.github/ISSUE_TEMPLATE/3-improvement-request.md
+++ b/.github/ISSUE_TEMPLATE/3-improvement-request.md
@@ -26,7 +26,7 @@ If this issue identifies a security vulnerability, DO NOT submit it! Instead, co
 the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
 guidelines at https://apache.org/security regarding vulnerability disclosure.
 
-- For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/slack-invite)
+- For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/tc-slack-request)
 or the Traffic Control Users mailing list (send an email to users-subscribe@trafficcontrol.apache.org to subscribe).
 - Before submitting, please **SEARCH GITHUB** for a similar issue or PR
     * https://github.com/apache/trafficcontrol/issues
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 77b9f65..52df685 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -17,5 +17,5 @@ contact_links:
     url: http://trafficcontrol.apache.org/mailing_lists
     about: Reach out to one of the Traffic Control mailing lists for discussion.
   - name: Support questions
-    url: https://s.apache.org/slack-invite
+    url: https://s.apache.org/tc-slack-request
     about: Visit us at ‌#traffic-control on Slack to ask a question.
diff --git a/docs/source/faq.rst b/docs/source/faq.rst
index 5c311c1..d311540 100644
--- a/docs/source/faq.rst
+++ b/docs/source/faq.rst
@@ -30,7 +30,7 @@ Who is using Traffic Control?
 
 How do I get help with Traffic Control?
 =======================================
-Join us at ``#traffic-control`` on the `ASF Slack <https://s.apache.org/slack-invite>`_ or send your questions to our `mailing list <ma...@trafficcontrol.apache.org>`_.  Slack is usually the best forum for quick Q&A type issues -- like when you are getting a Traffic Control CDN up and running or if you have a question about configuration. Any discussions that could potentially lead to decisions being made about the project -- like a new feature -- should happen on `the developer m [...]
+Join us at ``#traffic-control`` on the `ASF Slack <https://s.apache.org/tc-slack-request>`_ or send your questions to our `mailing list <ma...@trafficcontrol.apache.org>`_.  Slack is usually the best forum for quick Q&A type issues -- like when you are getting a Traffic Control CDN up and running or if you have a question about configuration. Any discussions that could potentially lead to decisions being made about the project -- like a new feature -- should happen on `the develop [...]
 
 How do I get involved with the development of Traffic Control?
 ==============================================================

[trafficcontrol] 05/09: Fix enroller build issues (#6227)

Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit e2e06c6f03e1fceea549b4ca2def0e79dc495f68
Author: Steve Hamrick <sh...@users.noreply.github.com>
AuthorDate: Mon Sep 20 11:10:34 2021 -0600

    Fix enroller build issues (#6227)
    
    * Fix enroller issues
    
    * Fix delve issues
    
    (cherry picked from commit c47f68ec44f3f58a166710dac2a755333c4db5ba)
---
 infrastructure/cdn-in-a-box/enroller/Dockerfile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/infrastructure/cdn-in-a-box/enroller/Dockerfile b/infrastructure/cdn-in-a-box/enroller/Dockerfile
index 896fbb7..cafa44e 100644
--- a/infrastructure/cdn-in-a-box/enroller/Dockerfile
+++ b/infrastructure/cdn-in-a-box/enroller/Dockerfile
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-FROM debian:buster AS enroller-dependencies
+FROM debian:bullseye AS enroller-dependencies
 
 RUN apt-get update && \
     apt-get install -y --no-install-recommends \
@@ -50,7 +50,7 @@ RUN set -o errexit -o nounset; \
     gcflags= ldflags=; \
     tags='usergo netgo'; \
     if [ "$ENROLLER_DEBUG_BUILD" = true ]; then \
-        apt-get install -y --no-install-recommends gcc libstdc++-8-dev; \
+        apt-get install -y --no-install-recommends gcc libstdc++-9-dev; \
         echo 'Building Enroller without optimization or inlining'; \
         gcflags='all=-N -l'; \
     else \
@@ -60,9 +60,9 @@ RUN set -o errexit -o nounset; \
     go build -ldflags "$ldflags" -gcflags "$gcflags" -tags "$tags"
 
 FROM enroller-dependencies as get-delve
-RUN go get -u github.com/go-delve/delve/cmd/dlv
+RUN go get github.com/go-delve/delve/cmd/dlv
 
-FROM debian:buster AS enroller
+FROM debian:bullseye AS enroller
 
 RUN apt-get update && apt-get install -y \
         netcat curl dnsutils net-tools \

[trafficcontrol] 01/09: Increasing astats string buffer size. We have seen astats config ip lists going beyond the existing 1k limit and being truncated. There is a proper rewrite on the way but this temporary fix can suffice for a while (#6212)

Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 4d6272baa104e4bafe826bb531752f3ea7b173cf
Author: Evan Zelkowitz <ez...@apache.org>
AuthorDate: Tue Sep 14 14:38:27 2021 -0600

    Increasing astats string buffer size. We have seen astats config ip lists going beyond the existing 1k limit and being truncated. There is a proper rewrite on the way but this temporary fix can suffice for a while (#6212)
    
    (cherry picked from commit ed8ac2fb4295353be4b9c0b25146cc444fd2a799)
---
 traffic_server/plugins/astats_over_http/astats_over_http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traffic_server/plugins/astats_over_http/astats_over_http.c b/traffic_server/plugins/astats_over_http/astats_over_http.c
index 1ac5dc6..df3adec 100644
--- a/traffic_server/plugins/astats_over_http/astats_over_http.c
+++ b/traffic_server/plugins/astats_over_http/astats_over_http.c
@@ -65,7 +65,7 @@ static int config_handler(TSCont cont, TSEvent event, void *edata);
 static config_t* get_config(TSCont cont);
 static config_holder_t* new_config_holder(const char* path);
 
-#define STR_BUFFER_SIZE 	1024
+#define STR_BUFFER_SIZE 	65536
 
 #define SYSTEM_RECORD_TYPE 		(0x100)
 #define DEFAULT_RECORD_TYPES	(SYSTEM_RECORD_TYPE | TS_RECORDTYPE_PROCESS | TS_RECORDTYPE_PLUGIN)

[trafficcontrol] 04/09: Fix grid comp issues (#6222)

Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 3c1aaa45adaf7d816cbf0edfca2f236f2747a286
Author: Steve Hamrick <sh...@users.noreply.github.com>
AuthorDate: Fri Sep 17 09:40:27 2021 -0600

    Fix grid comp issues (#6222)
    
    (cherry picked from commit 4450f721814c4eb426edd2440e500c2bf25d24ac)
---
 .../app/src/common/modules/table/agGrid/CommonGridController.js       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/traffic_portal/app/src/common/modules/table/agGrid/CommonGridController.js b/traffic_portal/app/src/common/modules/table/agGrid/CommonGridController.js
index 14b4fd6..f40390d 100644
--- a/traffic_portal/app/src/common/modules/table/agGrid/CommonGridController.js
+++ b/traffic_portal/app/src/common/modules/table/agGrid/CommonGridController.js
@@ -334,7 +334,7 @@ let CommonGridController = function ($scope, $document, $state, userModel, dateU
     this.exportCSV = function() {
         const params = {
             allColumns: true,
-            fileName: this.tablName + ".csv",
+            fileName: this.tableName + ".csv",
         };
         this.gridOptions.api.exportDataAsCsv(params);
     };
@@ -346,7 +346,7 @@ let CommonGridController = function ($scope, $document, $state, userModel, dateU
 
     this.onQuickSearchChanged = function() {
         this.gridOptions.api.setQuickFilter(this.quickSearch);
-        localStorage.setItem(this.title + "_quick_search", this.quickSearch);
+        localStorage.setItem(this.tableName + "_quick_search", this.quickSearch);
     };
 
     this.onPageSizeChanged = function() {

[trafficcontrol] 09/09: Compile ToDnssecRefresh binary into TO rpm, update cron job to use it (#6224)

Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit c97f45a1a8502e0e31c4f538f6a5a2a93869b35c
Author: Rawlin Peters <ra...@apache.org>
AuthorDate: Tue Sep 21 14:06:15 2021 -0600

    Compile ToDnssecRefresh binary into TO rpm, update cron job to use it (#6224)
    
    Closes: #6179
    (cherry picked from commit 23ee354a1e871d6bb5670f50fe47c16006767b11)
---
 CHANGELOG.md                                  |  1 +
 traffic_ops/build/build_rpm.sh                |  5 +++++
 traffic_ops/build/traffic_ops.spec            | 13 +++++++++++++
 traffic_ops/etc/cron.d/trafops_dnssec_refresh |  3 ++-
 4 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1fd6704..f060218 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -132,6 +132,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
 - CDN in a Box now uses Apache Traffic Server 8.1.
 - Customer names in payloads sent to the `/deliveryservices/request` Traffic Ops API endpoint can no longer contain characters besides alphanumerics, @, !, #, $, %, ^, &amp;, *, (, ), [, ], '.', ' ', and '-'. This fixes a vulnerability that allowed email content injection.
 - Go version 1.17 is used to compile Traffic Ops, T3C, Traffic Monitor, Traffic Stats, and Grove.
+- [#6179](https://github.com/apache/trafficcontrol/issues/6179) Updated the Traffic Ops rpm to include the `ToDnssecRefresh` binary and make the `trafops_dnssec_refresh` cron job use it
 
 ### Deprecated
 - The Riak Traffic Vault backend is now deprecated and its support may be removed in a future release. It is highly recommended to use the new PostgreSQL backend instead.
diff --git a/traffic_ops/build/build_rpm.sh b/traffic_ops/build/build_rpm.sh
index bdae8f4..e035df2 100755
--- a/traffic_ops/build/build_rpm.sh
+++ b/traffic_ops/build/build_rpm.sh
@@ -75,6 +75,11 @@ initBuildArea() {
 	go build -v -o admin -gcflags "$gcflags" -ldflags "$ldflags" -tags "$tags" || \
 								{ echo "Could not build db/admin binary"; return 1;})
 
+	# compile ToDnssecRefresh.go
+	(cd app/bin/checks/DnssecRefresh
+	go build -v -o ToDnssecRefresh -gcflags "$gcflags" -ldflags "$ldflags" -tags "$tags" || \
+								{ echo "Could not build ToDnssecRefresh binary"; return 1;})
+
 	# compile db/reencrypt
 		(cd app/db/reencrypt
 	go build -v -o reencrypt || \
diff --git a/traffic_ops/build/traffic_ops.spec b/traffic_ops/build/traffic_ops.spec
index fc427ba..ae487a6 100644
--- a/traffic_ops/build/traffic_ops.spec
+++ b/traffic_ops/build/traffic_ops.spec
@@ -81,6 +81,13 @@ db_admin_dir=src/github.com/apache/trafficcontrol/traffic_ops/app/db
 	cp "$TC_DIR"/traffic_ops/app/db/admin .
 ) || { echo "Could not copy go db admin at $(pwd): $!"; exit 1; };
 
+# copy ToDnssecRefresh
+to_dnssec_refresh_dir=src/github.com/apache/trafficcontrol/traffic_ops/app/bin/checks/DnssecRefresh
+( mkdir -p "$to_dnssec_refresh_dir" && \
+	cd "$to_dnssec_refresh_dir" && \
+	cp "$TC_DIR"/traffic_ops/app/bin/checks/DnssecRefresh/ToDnssecRefresh .
+) || { echo "Could not copy ToDnssecRefresh at $(pwd): $!"; exit 1; };
+
 # copy TV DB reencrypt
 reencrypt_dir=src/github.com/apache/trafficcontrol/traffic_ops/app/db/reencrypt
 ( mkdir -p "$reencrypt_dir" && \
@@ -133,6 +140,11 @@ db_admin_src=src/github.com/apache/trafficcontrol/traffic_ops/app/db
 %__rm $RPM_BUILD_ROOT/%{PACKAGEDIR}/app/db/*.go
 %__rm -r $RPM_BUILD_ROOT/%{PACKAGEDIR}/app/db/trafficvault/test
 
+to_dnssec_refresh_src=src/github.com/apache/trafficcontrol/traffic_ops/app/bin/checks/DnssecRefresh
+%__cp -p  "$to_dnssec_refresh_src"/ToDnssecRefresh           "${RPM_BUILD_ROOT}"/opt/traffic_ops/app/bin/checks/DnssecRefresh/ToDnssecRefresh
+%__rm $RPM_BUILD_ROOT/%{PACKAGEDIR}/app/bin/checks/DnssecRefresh/*.go
+%__rm -r $RPM_BUILD_ROOT/%{PACKAGEDIR}/app/bin/checks/DnssecRefresh/config
+
 reencrypt_src=src/github.com/apache/trafficcontrol/traffic_ops/app/db/reencrypt
 %__cp -p  "$reencrypt_src"/reencrypt           "${RPM_BUILD_ROOT}"/opt/traffic_ops/app/db/reencrypt/reencrypt
 %__rm $RPM_BUILD_ROOT/%{PACKAGEDIR}/app/db/reencrypt/*.go
@@ -239,6 +251,7 @@ fi
 %exclude %{PACKAGEDIR}/app/db/SQUASH.md
 %exclude %{PACKAGEDIR}/app/db/squash_migrations.sh
 %attr(755, %{TRAFFIC_OPS_USER},%{TRAFFIC_OPS_GROUP}) %{PACKAGEDIR}/install/bin/convert_profile/convert_profile
+%attr(755, %{TRAFFIC_OPS_USER},%{TRAFFIC_OPS_GROUP}) %{PACKAGEDIR}/app/bin/checks/DnssecRefresh/ToDnssecRefresh
 %attr(755, %{TRAFFIC_OPS_USER},%{TRAFFIC_OPS_GROUP}) %{PACKAGEDIR}/app/db/reencrypt/reencrypt
 %attr(755, %{TRAFFIC_OPS_USER},%{TRAFFIC_OPS_GROUP}) %{PACKAGEDIR}/app/db/traffic_vault_migrate/traffic_vault_migrate
 %{PACKAGEDIR}/etc
diff --git a/traffic_ops/etc/cron.d/trafops_dnssec_refresh b/traffic_ops/etc/cron.d/trafops_dnssec_refresh
index f6114b8..435b805 100644
--- a/traffic_ops/etc/cron.d/trafops_dnssec_refresh
+++ b/traffic_ops/etc/cron.d/trafops_dnssec_refresh
@@ -15,4 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-*/5 * * * * trafops export PERL5LIB=/opt/traffic_ops/app/local/lib/perl5:/opt/traffic_ops/app/lib; /opt/traffic_ops/app/bin/checks/ToDnssecRefresh.pl -c '{ "base_url": "https://127.0.0.1" }' -l 1 > /var/log/traffic_ops/trafops_dnssec_refresh.log 2>&1
+*/5 * * * * trafops /opt/traffic_ops/app/bin/checks/DnssecRefresh/ToDnssecRefresh --traffic-ops-url https://localhost --traffic-ops-user admin --traffic-ops-password twelve --log-location-error /var/log/traffic_ops/trafops_dnssec_refresh.log --log-location-warning /var/log/traffic_ops/trafops_dnssec_refresh.log --log-location-info /var/log/traffic_ops/trafops_dnssec_refresh.log
+

[trafficcontrol] 06/09: Remove t3c debug print (#6207)

Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 66891d1d41ba43c82cf6c3118f174c4973ade078
Author: Robert O Butts <ro...@users.noreply.github.com>
AuthorDate: Mon Sep 20 12:10:00 2021 -0600

    Remove t3c debug print (#6207)
    
    Fixes #6202
    
    (cherry picked from commit 5b64259c0ad5b524fa9315d9ac3c8c4c2e13b74d)
---
 cache-config/t3cutil/toreq/client.go | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cache-config/t3cutil/toreq/client.go b/cache-config/t3cutil/toreq/client.go
index 0f21b16..f4a32c0 100644
--- a/cache-config/t3cutil/toreq/client.go
+++ b/cache-config/t3cutil/toreq/client.go
@@ -76,7 +76,6 @@ func New(url *url.URL, user string, pass string, insecure bool, timeout time.Dur
 	opts.UserAgent = userAgent
 	opts.RequestTimeout = timeout
 	toClient, inf, err := toclient.Login(toURLStr, user, pass, opts)
-	log.Errorf("DEBUG toreq.New reqInf %+v\n", inf)
 	latestSupported := inf.StatusCode != 404 && inf.StatusCode != 501
 	if err != nil && latestSupported {
 		return nil, fmt.Errorf("Logging in to Traffic Ops '%v' code %v: %v", torequtil.MaybeIPStr(inf.RemoteAddr), inf.StatusCode, err)