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

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


The following commit(s) were added to refs/heads/5.1.x by this push:
     new 120fdfe  Added DS to a few warning messages (#5742)
120fdfe is described below

commit 120fdfebed10215ea3ee0175a664051973fee73e
Author: Steve Malenfant <[email protected]>
AuthorDate: Fri Apr 30 15:04:27 2021 -0400

    Added DS to a few warning messages (#5742)
    
    Changed "Starting atstccfg" to Info level
    
    Co-authored-by: Steve Malenfant <[email protected]>
    (cherry picked from commit 32e24eec8ab6f7ce7a7b1968b529ad8923ef0f58)
---
 lib/go-atscfg/parentdotconfig.go     | 18 +++++++++---------
 traffic_ops_ort/atstccfg/atstccfg.go |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/go-atscfg/parentdotconfig.go b/lib/go-atscfg/parentdotconfig.go
index 5fe3833..9a1f59e 100644
--- a/lib/go-atscfg/parentdotconfig.go
+++ b/lib/go-atscfg/parentdotconfig.go
@@ -288,7 +288,7 @@ func MakeParentDotConfig(
                }
                if ds.OrgServerFQDN == nil || *ds.OrgServerFQDN == "" {
                        // this check needs to be after the HTTP|DNS check, 
because Steering DSes without origins are ok'
-                       warnings = append(warnings, "ds  '"+*ds.XMLID+"' has no 
origin server! Skipping!")
+                       warnings = append(warnings, "DS '"+*ds.XMLID+"' has no 
origin server! Skipping!")
                        continue
                }
 
@@ -298,7 +298,7 @@ func MakeParentDotConfig(
                warnings = append(warnings, dsParamsWarnings...)
 
                if existingDS, ok := 
processedOriginsToDSNames[*ds.OrgServerFQDN]; ok {
-                       warnings = append(warnings, "duplicate origin! services 
'"+*ds.XMLID+"' and '"+string(existingDS)+"' share origin 
'"+*ds.OrgServerFQDN+"': skipping '"+*ds.XMLID+"'!")
+                       warnings = append(warnings, "duplicate origin! DS 
'"+*ds.XMLID+"' and '"+string(existingDS)+"' share origin 
'"+*ds.OrgServerFQDN+"': skipping '"+*ds.XMLID+"'!")
                        continue
                }
 
@@ -338,7 +338,7 @@ func MakeParentDotConfig(
                        orgURI, orgWarns, err := getOriginURI(*ds.OrgServerFQDN)
                        warnings = append(warnings, orgWarns...)
                        if err != nil {
-                               warnings = append(warnings, "malformed ds 
'"+*ds.XMLID+"' origin  URI: '"+*ds.OrgServerFQDN+"': skipping!"+err.Error())
+                               warnings = append(warnings, "DS '"+*ds.XMLID+"' 
has malformed origin URI: '"+*ds.OrgServerFQDN+"': skipping!"+err.Error())
                                continue
                        }
 
@@ -359,7 +359,7 @@ func MakeParentDotConfig(
 
                                if 
len(parentInfos[OriginHost(orgURI.Hostname())]) == 0 {
                                        // TODO error? emulates Perl
-                                       warnings = append(warnings, "delivery 
service "+*ds.XMLID+" has no parent servers")
+                                       warnings = append(warnings, "DS 
"+*ds.XMLID+" has no parent servers")
                                }
 
                                parents, secondaryParents, parentWarns := 
getMSOParentStrs(&ds, parentInfos[OriginHost(orgURI.Hostname())], atsMajorVer, 
dsParams.Algorithm, dsParams.TryAllPrimariesBeforeSecondary)
@@ -384,7 +384,7 @@ func MakeParentDotConfig(
                        orgURI, orgWarns, err := getOriginURI(*ds.OrgServerFQDN)
                        warnings = append(warnings, orgWarns...)
                        if err != nil {
-                               warnings = append(warnings, "malformed ds 
'"+*ds.XMLID+"' origin  URI: '"+*ds.OrgServerFQDN+"': skipping!"+err.Error())
+                               warnings = append(warnings, "DS '"+*ds.XMLID+"' 
had malformed origin  URI: '"+*ds.OrgServerFQDN+"': skipping!"+err.Error())
                                continue
                        }
 
@@ -691,7 +691,7 @@ func getParentDSParams(ds DeliveryService, 
profileParentConfigParams map[string]
                }
                if v, ok := 
dsParams[ParentConfigParamMSOUnavailableServerRetryResponses]; ok {
                        if v != "" && !unavailableServerRetryResponsesValid(v) {
-                               warnings = append(warnings, "malformed 
"+ParentConfigParamMSOUnavailableServerRetryResponses+" parameter '"+v+"', not 
using!")
+                               warnings = append(warnings, "DS '"+*ds.XMLID+"' 
had malformed "+ParentConfigParamMSOUnavailableServerRetryResponses+" parameter 
'"+v+"', not using!")
                        } else if v != "" {
                                params.UnavailableServerRetryResponses = v
                        }
@@ -713,7 +713,7 @@ func getParentDSParams(ds DeliveryService, 
profileParentConfigParams map[string]
        }
        if v, ok := dsParams[ParentConfigParamUnavailableServerRetryResponses]; 
ok {
                if v != "" && !unavailableServerRetryResponsesValid(v) {
-                       warnings = append(warnings, "malformed 
"+ParentConfigParamUnavailableServerRetryResponses+" parameter '"+v+"', not 
using!")
+                       warnings = append(warnings, "DS '"+*ds.XMLID+"' had 
malformed "+ParentConfigParamUnavailableServerRetryResponses+" parameter 
'"+v+"', not using!")
                } else if v != "" {
                        params.UnavailableServerRetryResponses = v
                }
@@ -760,7 +760,7 @@ func getTopologyParentConfigLine(
        orgURI, orgWarns, err := getOriginURI(*ds.OrgServerFQDN)
        warnings = append(warnings, orgWarns...)
        if err != nil {
-               return "", warnings, errors.New("Malformed ds '" + *ds.XMLID + 
"' origin  URI: '" + *ds.OrgServerFQDN + "': skipping!" + err.Error())
+               return "", warnings, errors.New("DS '" + *ds.XMLID + "' has 
malformed origin URI: '" + *ds.OrgServerFQDN + "': skipping!" + err.Error())
        }
 
        topology := nameTopologies[TopologyName(*ds.Topology)]
@@ -843,7 +843,7 @@ func getSecondaryModeStr(tryAllPrimariesBeforeSecondary 
bool, atsMajorVer int, d
                return "", warnings
        }
        if atsMajorVer < 8 {
-               warnings = append(warnings, "Delivery Service '"+string(ds)+"' 
had Parameter "+ParentConfigParamSecondaryMode+" but this cache is 
"+strconv.Itoa(atsMajorVer)+" and secondary_mode isn't supported in ATS until 
8. Not using!")
+               warnings = append(warnings, "DS '"+string(ds)+"' had Parameter 
"+ParentConfigParamSecondaryMode+" but this cache is 
"+strconv.Itoa(atsMajorVer)+" and secondary_mode isn't supported in ATS until 
8. Not using!")
                return "", warnings
        }
        return ` secondary_mode=2`, warnings // See 
https://docs.trafficserver.apache.org/en/8.0.x/admin-guide/files/parent.config.en.html
diff --git a/traffic_ops_ort/atstccfg/atstccfg.go 
b/traffic_ops_ort/atstccfg/atstccfg.go
index 1b0ba8c..cb56737 100644
--- a/traffic_ops_ort/atstccfg/atstccfg.go
+++ b/traffic_ops_ort/atstccfg/atstccfg.go
@@ -77,7 +77,7 @@ func main() {
        // Because logs will be appended, we want a "start" message, so 
individual runs are easily distinguishable.
        // log the "start" message to each distinct logger.
        startMsg := "Starting atstccfg"
-       log.Errorln(startMsg)
+       log.Infoln(startMsg)
        if cfg.WarningLog() != cfg.ErrorLog() {
                log.Warnln(startMsg)
        }

Reply via email to