zrhoffman commented on a change in pull request #6532: URL: https://github.com/apache/trafficcontrol/pull/6532#discussion_r811469475
########## File path: dev/traffic_ops/seed.psql ########## @@ -0,0 +1,290 @@ +/* Licensed 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. +*/ + +INSERT INTO tm_user ( + username, + tenant_id, + "role", + local_passwd, + confirm_local_passwd, + email, + full_name +) VALUES ( + 'admin', + (SELECT id FROM tenant WHERE "name" = 'root'), + (SELECT id FROM "role" WHERE "name" = 'admin'), + -- 'twelve12' encrypted with SCRYPT + 'SCRYPT:16384:8:1:p0Bppp/6IBeYxSwdLuYddsdMLBU/BNSlLY6fSIF7H1XW4eTbNVeMPVm7TuTEG4FM8PbqLlVwi8sPy8ZJznAlaQ==:sRcHWGe43mm/uEmXTIw37GcLEQZTlWAdf4vJqK8f0MDh8P+8gXoNx+nxWyb3r/0Bh+yyg0g/dUvti/ePZJL+Jw==', + 'SCRYPT:16384:8:1:p0Bppp/6IBeYxSwdLuYddsdMLBU/BNSlLY6fSIF7H1XW4eTbNVeMPVm7TuTEG4FM8PbqLlVwi8sPy8ZJznAlaQ==:sRcHWGe43mm/uEmXTIw37GcLEQZTlWAdf4vJqK8f0MDh8P+8gXoNx+nxWyb3r/0Bh+yyg0g/dUvti/ePZJL+Jw==', + '[email protected]', + 'Development Admin User' +) +ON CONFLICT (username) DO NOTHING; + +INSERT INTO cdn ( + "name", + domain_name +) VALUES ( + 'dev', + 'ciab.test' +); + +INSERT INTO snapshot ( + cdn, + crconfig, + monitoring +) VALUES ( + 'dev', + '{"config":{"coveragezone.polling.url":"file:///root/go/src/github.com/apache/trafficcontrol/traffic_router/core/src/test/resources/czmap.json","dnssec.enabled":"false","domain_name":"ciab.test","geolocation.polling.url":"file:///root/go/src/github.com/apache/trafficcontrol/traffic_router/core/src/test/resources/geo/GeoLite2-City.mmdb.gz"},"contentServers":{"edge":{"cacheGroup":"dev","fqdn":"edge.dev.ciab.test","hashCount":999,"hashId":"edge","httpsPort":443,"interfaceName":"eth0","ip":"129.0.0.2","ip6":"","locationId":"dev","port":80,"profile":"EDGE_dev","status":"REPORTED","type":"EDGE","routingDisabled":0}},"deliveryServices":{"dev":{"anonymousBlockingEnabled":"false","coverageZoneOnly":"false","deepCachingType":"NEVER","dispersion":{"limit":1,"shuffled":"true"},"domains":["dev.ciab.test"],"ecsEnabled":"false","geolocationProvider":"maxmindGeolocationService","ip6RoutingEnabled":"false","matchsets":[{"protocol":"HTTP","matchlist":[{"regex":".*\\\\.dev\\\\..*","match-type":"HOST" }]}],"protocol":{"acceptHttps":"false","redirectToHttps":"false"},"regionalGeoBlocking":"false","routingName":"cdn","soa":{"admin":"traffic_ops","expire":"604800","minimum":"30","refresh":"28800","retry":"7200"},"sslEnabled":"false","ttls":{"A":"","AAAA":"","NS":"3600","SOA":"86400"}}},"edgeLocations":{"dev":{"latitude":0,"longitude":0,"backupLocations":{"fallbackToClosest":"true"},"localizationMethods":["GEO","CZ","DEEP_CZ"]}},"monitors":{"trafficmonitor":{"fqdn":"trafficmonitor.dev.ciab.test","httpsPort":null,"ip":"129.0.0.1","ip6":"","location":"dev","port":80,"profile":"RASCAL_TM_dev","status":"ONLINE"}},"stats":{"CDN_name":"dev","date":1643833749,"tm_host":"trafficops","tm_user":"admin","tm_version":"development"}}', Review comment: In order for `coveragezone.polling.url` and `geolocation.polling.url` to show up in a snapshotted CRConfig, * The parameters need to be assigned to a Traffic Router profile for config file `CRConfig.json` * The Traffic Router profile should have an `ONLINE`-status Traffic Router assigned to it As a result of doing this, a `contentRouters` section is also added to the CRConfig. Since this snapshot in the `snapshot` table does not have a `contentRouters` section, Traffic Router rejects the CRConfig. Logged at `org.apache.traffic_control.traffic_router.core.monitor.TrafficMonitorWatcher:119`: ``` Failed querying JSON for key: contentRouters ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
