Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions traffic_ops/ort/atstccfg/cfgfile/cacheurldotconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"errors"

"github.com/apache/trafficcontrol/lib/go-atscfg"
"github.com/apache/trafficcontrol/lib/go-log"
"github.com/apache/trafficcontrol/lib/go-tc"
"github.com/apache/trafficcontrol/traffic_ops/ort/atstccfg/config"
"github.com/apache/trafficcontrol/traffic_ops/ort/atstccfg/toreq"
Expand Down Expand Up @@ -62,8 +61,6 @@ func GetConfigFileCDNCacheURL(cfg config.TCCfg, cdnNameOrID string, fileName str
return "", errors.New("getting delivery service servers: " + err.Error())
}

log.Errorf("gcfccu dss: %v\n", len(dss))

dssMap := map[int][]int{} // map[dsID]serverID
for _, dss := range dss {
if dss.Server == nil || dss.DeliveryService == nil {
Expand All @@ -77,6 +74,10 @@ func GetConfigFileCDNCacheURL(cfg config.TCCfg, cdnNameOrID string, fileName str
if ds.ID == nil {
continue // TODO warn
}
// ANY_MAP and STEERING DSes don't have origins, and thus can't be put into the cacheurl config.
if ds.Type != nil && (*ds.Type == tc.DSTypeAnyMap || *ds.Type == tc.DSTypeSteering) {
continue
}
if len(dssMap[*ds.ID]) == 0 {
continue
}
Expand Down
12 changes: 11 additions & 1 deletion traffic_ops/ort/atstccfg/cfgfile/sslmulticertdotconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"errors"

"github.com/apache/trafficcontrol/lib/go-atscfg"
"github.com/apache/trafficcontrol/lib/go-tc"
"github.com/apache/trafficcontrol/traffic_ops/ort/atstccfg/config"
"github.com/apache/trafficcontrol/traffic_ops/ort/atstccfg/toreq"
)
Expand All @@ -48,7 +49,16 @@ func GetConfigFileCDNSSLMultiCertDotConfig(cfg config.TCCfg, cdnNameOrID string)
return "", errors.New("getting delivery services: " + err.Error())
}

cfgDSes := atscfg.DeliveryServicesToSSLMultiCertDSes(dses)
filteredDSes := []tc.DeliveryServiceNullable{}
for _, ds := range dses {
// ANY_MAP and STEERING DSes don't have origins, and thus can't be put into the ssl config.
if ds.Type != nil && (*ds.Type == tc.DSTypeAnyMap || *ds.Type == tc.DSTypeSteering) {
continue
}
filteredDSes = append(filteredDSes, ds)
}

cfgDSes := atscfg.DeliveryServicesToSSLMultiCertDSes(filteredDSes)

txt := atscfg.MakeSSLMultiCertDotConfig(cdnName, toToolName, toURL, cfgDSes)
return txt, nil
Expand Down