diff --git a/CHANGELOG.md b/CHANGELOG.md index 81e5854a56..63e326fe8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -142,6 +142,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - [#6066](https://github.com/apache/trafficcontrol/issues/6066) - Fixed missing/incorrect indices on some tables - [#6169](https://github.com/apache/trafficcontrol/issues/6169) - Fixed t3c-update not updating server status when a fallback to a previous Traffic Ops API version occurred - [#5576](https://github.com/apache/trafficcontrol/issues/5576) - Inconsistent Profile Name restrictions +- [#6327](https://github.com/apache/trafficcontrol/issues/6327) - Fixed cache config to invalidate its cache if the Server's Profile or CDN changes - [#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. diff --git a/cache-config/t3cutil/getdatacfg.go b/cache-config/t3cutil/getdatacfg.go index 5e3a280894..d78163b975 100644 --- a/cache-config/t3cutil/getdatacfg.go +++ b/cache-config/t3cutil/getdatacfg.go @@ -108,6 +108,7 @@ type ConfigData struct { } type ConfigDataMetaData struct { + CacheHostName string `json:"cache_host_name"` Servers ReqMetaData `json:"servers"` CacheGroups ReqMetaData `json:"cache_groups"` GlobalParams ReqMetaData `json:"global_parameters"` @@ -176,6 +177,7 @@ func GetConfigData(toClient *toreq.TOClient, disableProxy bool, cacheHostName st toIPs := &sync.Map{} // each Traffic Ops request could get a different IP, so track them all toData := &ConfigData{} + toData.MetaData.CacheHostName = cacheHostName { reqHdr := (http.Header)(nil) @@ -220,6 +222,16 @@ func GetConfigData(toClient *toreq.TOClient, disableProxy bool, cacheHostName st log.Infoln("Traffic Ops proxy is disabled, not checking or using GLOBAL Parameter '" + TrafficOpsProxyParameterName) } + oldServer := &atscfg.Server{} + if oldCfg != nil { + for _, toServer := range oldCfg.Servers { + if toServer.HostName != nil && *toServer.HostName == oldCfg.MetaData.CacheHostName { + oldServer = &toServer + break + } + } + } + serversF := func() error { defer func(start time.Time) { log.Infof("serversF took %v\n", time.Since(start)) }(time.Now()) // TODO TOAPI add /servers?cdn=1 query param @@ -267,8 +279,9 @@ func GetConfigData(toClient *toreq.TOClient, disableProxy bool, cacheHostName st defer func(start time.Time) { log.Infof("sslF took %v\n", time.Since(start)) }(time.Now()) { + reqHdr := (http.Header)(nil) - if oldCfg != nil { + if oldCfg != nil && oldServer.CDNName != nil && *oldServer.CDNName == *server.CDNName { reqHdr = MakeReqHdr(oldCfg.MetaData.SSLKeys) } keys, reqInf, err := toClient.GetCDNSSLKeys(tc.CDNName(*server.CDNName), reqHdr) @@ -293,7 +306,7 @@ func GetConfigData(toClient *toreq.TOClient, disableProxy bool, cacheHostName st { reqHdr := (http.Header)(nil) - if oldCfg != nil { + if oldCfg != nil && oldServer.CDNName != nil && *oldServer.CDNName == *server.CDNName { reqHdr = MakeReqHdr(oldCfg.MetaData.DeliveryServices) } dses, reqInf, err := toClient.GetCDNDeliveryServices(*server.CDNID, reqHdr) @@ -329,7 +342,7 @@ func GetConfigData(toClient *toreq.TOClient, disableProxy bool, cacheHostName st { reqHdr := (http.Header)(nil) - if oldCfg != nil { + if oldCfg != nil && oldServer.CDNName != nil && *oldServer.CDNName == *server.CDNName { reqHdr = MakeReqHdr(oldCfg.MetaData.DeliveryServiceServers) } dss, reqInf, err := toClient.GetDeliveryServiceServers(nil, nil, *server.CDNName, reqHdr) @@ -447,7 +460,7 @@ func GetConfigData(toClient *toreq.TOClient, disableProxy bool, cacheHostName st defer func(start time.Time) { log.Infof("serverParamsF took %v\n", time.Since(start)) }(time.Now()) { reqHdr := (http.Header)(nil) - if oldCfg != nil { + if oldCfg != nil && oldServer.Profile != nil && *oldServer.Profile == *server.Profile { reqHdr = MakeReqHdr(oldCfg.MetaData.ServerParams) } params, reqInf, err := toClient.GetServerProfileParameters(*server.Profile, reqHdr) @@ -473,7 +486,7 @@ func GetConfigData(toClient *toreq.TOClient, disableProxy bool, cacheHostName st defer func(start time.Time) { log.Infof("cdnF took %v\n", time.Since(start)) }(time.Now()) { reqHdr := (http.Header)(nil) - if oldCfg != nil { + if oldCfg != nil && oldServer.CDNName != nil && *oldServer.CDNName == *server.CDNName { reqHdr = MakeReqHdr(oldCfg.MetaData.CDN) } cdn, reqInf, err := toClient.GetCDN(tc.CDNName(*server.CDNName), reqHdr) @@ -496,8 +509,8 @@ func GetConfigData(toClient *toreq.TOClient, disableProxy bool, cacheHostName st defer func(start time.Time) { log.Infof("profileF took %v\n", time.Since(start)) }(time.Now()) { reqHdr := (http.Header)(nil) - if oldCfg != nil { - reqHdr = MakeReqHdr(oldCfg.MetaData.GlobalParams) + if oldCfg != nil && oldServer.Profile != nil && *oldServer.Profile == *server.Profile { + reqHdr = MakeReqHdr(oldCfg.MetaData.Profile) } profile, reqInf, err := toClient.GetProfileByName(*server.Profile, reqHdr) if err != nil { @@ -519,7 +532,7 @@ func GetConfigData(toClient *toreq.TOClient, disableProxy bool, cacheHostName st defer func(start time.Time) { log.Infof("jobsF took %v\n", time.Since(start)) }(time.Now()) { reqHdr := (http.Header)(nil) - if oldCfg != nil { + if oldCfg != nil && oldServer.CDNName != nil && *oldServer.CDNName == *server.CDNName { reqHdr = MakeReqHdr(oldCfg.MetaData.Jobs) } jobs, reqInf, err := toClient.GetJobs(reqHdr, *server.CDNName) diff --git a/cache-config/testing/ort-tests/t3c-ims_test.go b/cache-config/testing/ort-tests/t3c-ims_test.go index dc49f5465e..a9e7eea1ee 100644 --- a/cache-config/testing/ort-tests/t3c-ims_test.go +++ b/cache-config/testing/ort-tests/t3c-ims_test.go @@ -15,12 +15,20 @@ package orttest */ import ( + "bytes" + "errors" + "io/ioutil" + "net/url" + "path/filepath" "strings" "testing" "github.com/apache/trafficcontrol/cache-config/t3cutil" "github.com/apache/trafficcontrol/cache-config/testing/ort-tests/tcdata" testutil "github.com/apache/trafficcontrol/cache-config/testing/ort-tests/util" + "github.com/apache/trafficcontrol/lib/go-tc" + "github.com/apache/trafficcontrol/traffic_ops/toclientlib" + toclient "github.com/apache/trafficcontrol/traffic_ops/v3-client" ) func TestIMS(t *testing.T) { @@ -33,6 +41,7 @@ func TestIMS(t *testing.T) { tcdata.DeliveryServices}, func() { doTestIMS(t) + doTestIMSChangedCDN(t) }) t.Logf("------------- End of TestIMS ---------------") @@ -67,6 +76,111 @@ func doTestIMS(t *testing.T) { t.Logf("------------- End doTestIMS ---------------") } +// doTestIMSChangedCDN tests that after caching, requests which use the CDN as a key don't use the invalid cache. +func doTestIMSChangedCDN(t *testing.T) { + t.Logf("------------- Start doTestIMSChangedCDN ---------------") + defer func() { t.Logf("------------- End doTestIMSChangedCDN ---------------") }() + + cacheHostName := "atlanta-edge-03" + + t.Logf("doTestIMSChangedCDN calling badass with cache") + if stdOut, exitCode := t3cApplyCache(cacheHostName, false); exitCode != 0 { + t.Fatalf("ERROR: t3c badass failed: code '%v' output '%v'\n", exitCode, stdOut) + } + + if !testutil.FileExists(t3cutil.ApplyCachePath) { + t.Fatalf("expected: cache '%v' to exist after badass, actual: doesn't exist", t3cutil.ApplyCachePath) + } + + if stdOut, exitCode := t3cApplyCache(cacheHostName, false); exitCode != 0 { + t.Fatalf("ERROR: t3c badass failed: code '%v' output '%v'\n", exitCode, stdOut) + } else if !strings.Contains(stdOut, "not modified, using old config") { + t.Errorf("ERROR: expected t3c second badass to have a successful IMS 304, actual: code '%v' output '%v'\n", exitCode, stdOut) + } + + cdn1Domain := "test.cdn1.net" + cdn2Domain := "test.cdn2.net" + cdn2ProfileName := "ATS_EDGE_TIER_CACHE_CDN2" + + { + // check that remap.config has the initial cdn1 + + remapName := filepath.Join(test_config_dir, "remap.config") + remapDotConfig, err := ioutil.ReadFile(remapName) + if err != nil { + t.Fatalf("reading %v: %v\n", remapName, err) + } + + if !bytes.Contains(remapDotConfig, []byte(cdn1Domain)) { + t.Errorf("expected remap.config to contain cdn1 domain '%v', actual: '%v'\n", cdn1Domain, string(remapDotConfig)) + } + } + + { + // change the server's CDN + + cdn2Name := "cdn2" + cdns, _, err := tcdata.TOSession.GetCDNByNameWithHdr(cdn2Name, nil) + if err != nil { + t.Fatalf("getting cdn: " + err.Error()) + } else if len(cdns) != 1 { + t.Fatalf("getting cdn: expected 1 cdn actual num %v cdns %+v", len(cdns), cdns) + } + + // have to change the profile at the same time, or TO will reject the change. + profiles, _, err := tcdata.TOSession.GetProfileByNameWithHdr(cdn2ProfileName, nil) + if err != nil { + t.Fatalf("getting profile: " + err.Error()) + } else if len(cdns) != 1 { + t.Fatalf("getting profile: expected 1 cdn actual num %v objects %+v", len(profiles), profiles) + } + + cdn2ID := cdns[0].ID + cdn2ProfileID := profiles[0].ID + + sv, _, err := GetServer(tcdata.TOSession, cacheHostName) + if err != nil { + t.Fatalf("getting server: " + err.Error()) + } + + sv.CDNID = &cdn2ID + sv.CDNName = &cdn2Name + sv.ProfileID = &cdn2ProfileID + sv.Profile = &cdn2ProfileName + + _, _, err = tcdata.TOSession.UpdateServerByIDWithHdr(*sv.ID, *sv, nil) + if err != nil { + t.Fatalf("updating server: " + err.Error()) + } + } + + // run t3c after changing the cdn + + stdOut, exitCode := t3cApplyCache(cacheHostName, false) + if exitCode != 0 { + t.Fatalf("ERROR: t3c badass failed: code '%v' output '%v'\n", exitCode, stdOut) + } + + { + // check that remap.config has the changed cdn2, and does not have the old cdn1 + + remapName := filepath.Join(test_config_dir, "remap.config") + remapDotConfig, err := ioutil.ReadFile(remapName) + if err != nil { + t.Fatalf("reading %v: %v\n", remapName, err) + } + + if !bytes.Contains(remapDotConfig, []byte(cdn2Domain)) { + t.Errorf("expected after changing server to cdn2 for remap.config to contain cdn2 domain '%v', actual: '%v'\n", cdn2Domain, string(remapDotConfig)) + } + + if bytes.Contains(remapDotConfig, []byte(cdn1Domain)) { + t.Errorf("expected after changing server to cdn2 for remap.config to not contain cdn1 domain '%v', actual: '%v'\n", cdn1Domain, string(remapDotConfig)) + } + } + +} + func t3cApplyCache(host string, noCache bool) (string, int) { args := []string{ "apply", @@ -87,3 +201,16 @@ func t3cApplyCache(host string, noCache bool) (string, int) { _, stdErr, exitCode := t3cutil.Do("t3c", args...) // should be no stdout, we told it to log to stderr return string(stdErr), exitCode } + +func GetServer(toClient *toclient.Session, hostName string) (*tc.ServerV30, toclientlib.ReqInf, error) { + params := url.Values{} + params.Add("hostName", hostName) + resp, reqInf, err := toClient.GetServersWithHdr(¶ms, nil) + if err != nil { + return nil, reqInf, err + } + if len(resp.Response) == 0 { + return nil, reqInf, errors.New("not found") + } + return &resp.Response[0], reqInf, nil +} diff --git a/cache-config/testing/ort-tests/tc-fixtures.json b/cache-config/testing/ort-tests/tc-fixtures.json index 22db9064d9..5da6cc936e 100644 --- a/cache-config/testing/ort-tests/tc-fixtures.json +++ b/cache-config/testing/ort-tests/tc-fixtures.json @@ -883,6 +883,70 @@ "innerHeaderRewrite": "cond %{REMAP_PSEUDO_HOOK}__RETURN__set-header CDN-SVCI \"innerHeaderRewrite\" [L]", "lastHeaderRewrite": "cond %{REMAP_PSEUDO_HOOK} __RETURN__ set-header CDN-SVCL \"lastHeaderRewrite\" [L]" }, + { + "active": true, + "cdnName": "cdn2", + "cacheurl": "", + "ccrDnsTtl": 3600, + "checkPath": "", + "consistentHashQueryParams": [], + "deepCachingType": "NEVER", + "displayName": "ds-on-cdn2", + "dnsBypassCname": null, + "dnsBypassIp": "", + "dnsBypassIp6": "", + "dnsBypassTtl": 30, + "dscp": 40, + "edgeHeaderRewrite": null, + "fqPacingRate": 0, + "geoLimit": 0, + "geoLimitCountries": "", + "geoLimitRedirectURL": null, + "geoProvider": 0, + "globalMaxMbps": 0, + "globalMaxTps": 0, + "httpBypassFqdn": "", + "infoUrl": "TBD", + "initialDispersion": 1, + "ipv6RoutingEnabled": true, + "lastUpdated": "2018-04-06 16:48:51+00", + "logsEnabled": false, + "longDesc": "d s top", + "longDesc1": "ds top", + "longDesc2": "ds-top", + "matchList": [ + { + "pattern": ".*\\.ds-cdn2\\..*", + "setNumber": 0, + "type": "HOST_REGEXP" + } + ], + "maxDnsAnswers": 0, + "midHeaderRewrite": null, + "missLat": 41.881944, + "missLong": -87.627778, + "multiSiteOrigin": false, + "orgServerFqdn": "http://ds-cdn2-origin.example.net", + "originShield": null, + "profileDescription": null, + "profileName": null, + "protocol": 2, + "qstringIgnore": 1, + "rangeRequestHandling": 0, + "regexRemap": null, + "regionalGeoBlocking": false, + "remapText": null, + "routingName": "cdn", + "signed": false, + "signingAlgorithm": null, + "sslKeyVersion": 0, + "tenant": "tenant1", + "tenantName": "tenant1", + "type": "HTTP_LIVE_NATNL", + "xmlId": "ds-cdn2", + "anonymousBlockingEnabled": false, + "topology": "top-for-ds-cdn2" + }, { "active": true, "cdnName": "cdn1", @@ -1377,25 +1441,422 @@ "zip": "80301" }, { - "address": "1234 southern way", - "city": "Atlanta", - "comments": null, - "email": null, - "lastUpdated": "2018-01-19T21:19:32.089538+00:00", - "name": "HotAtlanta", - "phone": "404-222-2222", - "poc": null, - "region": "region1", - "shortName": "atlanta", - "state": "GA", - "zip": "30301" - } - ], - "profiles": [ - { - "cdnName": "cdn1", + "address": "1234 southern way", + "city": "Atlanta", + "comments": null, + "email": null, + "lastUpdated": "2018-01-19T21:19:32.089538+00:00", + "name": "HotAtlanta", + "phone": "404-222-2222", + "poc": null, + "region": "region1", + "shortName": "atlanta", + "state": "GA", + "zip": "30301" + } + ], + "profiles": [ + { + "cdnName": "cdn1", + "description": "Edge Cache - Apache Traffic Server", + "name": "ATS_EDGE_TIER_CACHE", + "routingDisabled": false, + "type": "ATS_PROFILE", + "params": [ + { + "configFile": "records.config", + "name": "CONFIG proxy.config.proxy_name", + "secure": false, + "value": "STRING __HOSTNAME__" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.config_dir", + "secure": false, + "value": "STRING /opt/trafficserver/etc/trafficserver" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.admin.user_id", + "secure": false, + "value": "STRING ats" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.http.server_ports", + "secure": false, + "value": "STRING 8080 8080:ipv6" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.http.insert_response_via_str", + "secure": false, + "value": "INT 3" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.http.parent_proxy_routing_enable", + "secure": false, + "value": "INT 1" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.http.parent_proxy.retry_time", + "secure": false, + "value": "INT 60" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.http.connect_attempts_timeout", + "secure": false, + "value": "INT 10" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.http.cache.required_headers", + "secure": false, + "value": "INT 0" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.http.enable_http_stats", + "secure": false, + "value": "INT 1" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.dns.round_robin_nameservers", + "secure": false, + "value": "INT 0" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.log.max_space_mb_for_logs", + "secure": false, + "value": "INT 512" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.log.max_space_mb_headroom", + "secure": false, + "value": "INT 50" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.log.logfile_dir", + "secure": false, + "value": "STRING /opt/trafficserver/var/log/trafficserver" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.reverse_proxy.enabled", + "secure": false, + "value": "INT 0" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.diags.debug.enabled", + "secure": false, + "value": "INT 1" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.http.slow.log.threshold", + "secure": false, + "value": "INT 10000" + }, + { + "configFile": "cache.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver/" + }, + { + "configFile": "hosting.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver/" + }, + { + "configFile": "parent.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver/" + }, + { + "configFile": "plugin.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver/" + }, + { + "configFile": "records.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver/" + }, + { + "configFile": "storage.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver/" + }, + { + "configFile": "volume.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver/" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.url_remap.remap_required", + "secure": false, + "value": "INT 0" + }, + { + "configFile": "rascal.properties", + "name": "health.threshold.queryTime", + "secure": false, + "value": "1000" + }, + { + "configFile": "rascal.properties", + "name": "health.polling.url", + "secure": false, + "value": "http://${hostname}/_astats?application=&inf.name=${interface_name}" + }, + { + "configFile": "storage.config", + "name": "Disk_Volume", + "secure": false, + "value": "1" + }, + { + "configFile": "rascal.properties", + "name": "health.connection.timeout", + "secure": false, + "value": "2000" + }, + { + "configFile": "chkconfig", + "name": "trafficserver", + "secure": false, + "value": "0:off\t1:off\t2:on\t3:on\t4:on\t5:on\t6:off" + }, + { + "configFile": "regex_revalidate.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.exec_thread.autoconfig", + "secure": false, + "value": "INT 0" + }, + { + "configFile": "astats.config", + "name": "allow_ip", + "secure": false, + "value": "127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16" + }, + { + "configFile": "astats.config", + "name": "allow_ip6", + "secure": false, + "value": "::1/128,fc01:9400:1000:8::/64" + }, + { + "configFile": "astats.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver" + }, + { + "configFile": "astats.config", + "name": "path", + "secure": false, + "value": "_astats" + }, + { + "configFile": "astats.config", + "name": "record_types", + "secure": false, + "value": "122" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.http.transaction_active_timeout_in", + "secure": false, + "value": "INT 0" + }, + { + "configFile": "records.config", + "name": "CONFIG proxy.config.body_factory.template_sets_dir", + "secure": false, + "value": "STRING /opt/trafficserver/etc/trafficserver/body_factory" + }, + { + "configFile": "storage.config", + "name": "Drive_Letters", + "secure": false, + "value": "cache" + }, + { + "configFile": "ip_allow.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver" + }, + { + "configFile": "storage.config", + "name": "Drive_Prefix", + "secure": false, + "value": "/var/trafficserver/" + }, + { + "configFile": "set_dscp_0.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_10.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_12.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_14.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_18.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_20.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_22.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_26.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_28.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_30.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_34.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_36.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_38.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_8.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_16.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_24.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_32.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_40.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_48.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_56.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "set_dscp_37.config", + "name": "location", + "value": "/opt/trafficserver/etc/trafficserver/dscp" + }, + { + "configFile": "package", + "lastUpdated": "2018-01-19T19:01:21.499423+00:00", + "name": "trafficserver", + "secure": true, + "value": "CHANGEME" + }, + { + "configFile": "empty-file.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver/" + }, + { + "configFile": "non-empty-file.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver/" + }, + { + "configFile": "non-empty-file.config", + "name": "foo", + "secure": false, + "value": "bar" + }, + { + "configFile": "remap.config", + "name": "location", + "secure": false, + "value": "/opt/trafficserver/etc/trafficserver" + } + ] + }, + { + "cdnName": "cdn2", "description": "Edge Cache - Apache Traffic Server", - "name": "ATS_EDGE_TIER_CACHE", + "name": "ATS_EDGE_TIER_CACHE_CDN2", "routingDisabled": false, "type": "ATS_PROFILE", "params": [ @@ -2190,6 +2651,106 @@ "xmppId": "atlanta-edge-03\\\\@ocdn.kabletown.net", "xmppPasswd": "X" }, + { + "cachegroup": "cachegroup2", + "cdnName": "cdn1", + "domainName": "ga.atlanta.kabletown.net", + "guid": null, + "hostName": "atlanta-edge-03-02", + "httpsPort": 443, + "iloIpAddress": "", + "iloIpGateway": "", + "iloIpNetmask": "", + "iloPassword": "", + "iloUsername": "", + "interfaces": [ + { + "ipAddresses": [ + { + "address": "127.0.0.19/30", + "gateway": "127.0.0.19", + "serviceAddress": true + }, + { + "address": "2345:1234:12:d::10/64", + "gateway": "2345:1234:12:d::10", + "serviceAddress": false + } + ], + "maxBandwidth": null, + "monitor": true, + "mtu": 9000, + "name": "bond0" + } + ], + "lastUpdated": "2018-03-28T17:30:00.220351+00:00", + "mgmtIpAddress": "", + "mgmtIpGateway": "", + "mgmtIpNetmask": "", + "offlineReason": null, + "physLocation": "Denver", + "profile": "ATS_EDGE_TIER_CACHE", + "rack": "RR 119.02", + "revalPending": false, + "routerHostName": "", + "routerPortName": "", + "status": "REPORTED", + "tcpPort": 80, + "type": "EDGE", + "updPending": false, + "xmppId": "atlanta-edge-03\\\\@ocdn.kabletown.net", + "xmppPasswd": "X" + }, + { + "cachegroup": "cachegroup2", + "cdnName": "cdn2", + "domainName": "ga.atlanta.kabletown.net", + "guid": null, + "hostName": "atlanta-edge-03-03", + "httpsPort": 443, + "iloIpAddress": "", + "iloIpGateway": "", + "iloIpNetmask": "", + "iloPassword": "", + "iloUsername": "", + "interfaces": [ + { + "ipAddresses": [ + { + "address": "127.0.0.20/30", + "gateway": "127.0.0.20", + "serviceAddress": true + }, + { + "address": "2345:1234:12:d::11/64", + "gateway": "2345:1234:12:d::11", + "serviceAddress": false + } + ], + "maxBandwidth": null, + "monitor": true, + "mtu": 9000, + "name": "bond0" + } + ], + "lastUpdated": "2018-03-28T17:30:00.220351+00:00", + "mgmtIpAddress": "", + "mgmtIpGateway": "", + "mgmtIpNetmask": "", + "offlineReason": null, + "physLocation": "Denver", + "profile": "ATS_EDGE_TIER_CACHE_CDN2", + "rack": "RR 119.02", + "revalPending": false, + "routerHostName": "", + "routerPortName": "", + "status": "REPORTED", + "tcpPort": 80, + "type": "EDGE", + "updPending": false, + "xmppId": "atlanta-edge-03\\\\@ocdn.kabletown.net", + "xmppPasswd": "X" + }, { "cachegroup": "cachegroup1", "cdnName": "cdn1", @@ -4257,6 +4818,16 @@ ] } ] + }, + { + "name": "top-for-ds-cdn2", + "description": "a topology", + "nodes": [ + { + "cachegroup": "cachegroup2", + "parents": [] + } + ] } ], "types": [