This is an automated email from the ASF dual-hosted git repository.
srijeet0406 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 0ba5f8b7a7 change go-direct default to be old behavior (#7600)
0ba5f8b7a7 is described below
commit 0ba5f8b7a7b08492a7fc9e62abe01dfbcdbe5041
Author: Joe Pappano <[email protected]>
AuthorDate: Wed Jun 28 17:09:49 2023 -0400
change go-direct default to be old behavior (#7600)
* changed go-direct default to be old behavior
* added change log entry
---
CHANGELOG.md | 1 +
cache-config/t3c-apply/config/config.go | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0464ff5933..cd3b6df5cf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -56,6 +56,7 @@ The format is based on [Keep a
Changelog](http://keepachangelog.com/en/1.0.0/).
- [#7366](https://github.com/apache/trafficcontrol/pull/7366) *t3c* Removed
timestamp from metadata file since it's changing every minute and causing
excessive commits to git repo.
- [#7386](https://github.com/apache/trafficcontrol/pull/7386) *Traffic Portal*
Increased the number of events that are logged to the TP access log.
- [#7469](https://github.com/apache/trafficcontrol/pull/7469) *Traffic Ops*
Changed logic to not report empty or missing cookies into TO error.log.
+- [#7600](https://github.com/apache/trafficcontrol/pull/7600) *t3c* changed
default go-direct command line arg to be old to avoid unexpected config changes
upon upgrade.
### Fixed
- [#7561](https://github.com/apache/trafficcontrol/pull/7561) *Traffic Ops*
*Traffic Ops* Fixed `ASN` V5 apis to respond with `RFC3339` date/time Format.
diff --git a/cache-config/t3c-apply/config/config.go
b/cache-config/t3c-apply/config/config.go
index 71007ff28e..64a62a0160 100644
--- a/cache-config/t3c-apply/config/config.go
+++ b/cache-config/t3c-apply/config/config.go
@@ -256,7 +256,7 @@ func GetCfg(appVersion string, gitRevision string) (Cfg,
error) {
silentPtr := getopt.BoolLong(silentFlagName, 's', `Silent. Errors are
not logged, and the 'verbose' flag is ignored. If a fatal error occurs, the
return code will be non-zero but no text will be output to stderr`)
const goDirectFlagName = "go-direct"
- goDirectPtr := getopt.StringLong(goDirectFlagName, 'G', "false",
"[true|false|old] default will set go_direct to false, you can set go_direct
true, or old will be based on opposite of parent_is_proxy directive.")
+ goDirectPtr := getopt.StringLong(goDirectFlagName, 'G', "old",
"[true|false|old] default will set go_direct to old and it will be based on
opposite of parent_is_proxy directivefalse, you can also set go_direct true, or
false.")
const waitForParentsFlagName = "wait-for-parents"
waitForParentsPtr := getopt.BoolLong(waitForParentsFlagName, 'W',
"[true | false] do not update if parent_pending = 1 in the update json. Default
is false")
@@ -376,11 +376,11 @@ If any of the related flags are also set, they override
the mode's default behav
switch *goDirectPtr {
case "false", "true", "old":
if !getopt.IsSet(goDirectFlagName) {
- modeLogStrs = append(modeLogStrs, goDirectFlagName+"
not set using default 'false")
+ modeLogStrs = append(modeLogStrs, goDirectFlagName+"
not set using default 'old'")
}
default:
- modeLogStrs = append(modeLogStrs, *goDirectPtr+" is not a valid
go-direct option setting default 'false'")
- *goDirectPtr = "false"
+ modeLogStrs = append(modeLogStrs, *goDirectPtr+" is not a valid
go-direct option setting default 'old'")
+ *goDirectPtr = "old"
}
if *serviceActionPtr == "" {