[
https://issues.apache.org/jira/browse/TC-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884394#comment-15884394
]
ASF GitHub Bot commented on TC-32:
----------------------------------
Github user knutsel commented on the issue:
https://github.com/apache/incubator-trafficcontrol/pull/199
hey @dg4prez - your new test fails for me?
`[jvd@jvd-knutsel-4 app (master *$>)]$ prove -v
./t/api/1.2/config_files_apache_traffic_server.t
./t/api/1.2/config_files_apache_traffic_server.t .. Subroutine
TrafficOps::has redefined at
/home/jvd/work/gh/knutsel/incubator-trafficcontrol/traffic_ops/app/local/lib/perl5/Mojo/Base.pm
line 38.
Subroutine TrafficOps::has redefined at
/home/jvd/work/gh/knutsel/incubator-trafficcontrol/traffic_ops/app/local/lib/perl5/Mojo/Base.pm
line 38.
Loading config from
/home/jvd/work/gh/knutsel/incubator-trafficcontrol/traffic_ops/app/conf/cdn.conf
Reading log4perl config from
/home/jvd/work/gh/knutsel/incubator-trafficcontrol/traffic_ops/app/conf/test/log4perl.conf
Setting mojo inactivity timeout to 60
-------------------------------------------------------------
Loading Mojo Routes from package: TrafficOpsRoutes
-------------------------------------------------------------
[Sat Feb 25 21:50:28 2017] [info] admin was found in the database.
[Sat Feb 25 21:50:28 2017] [debug] Password matched.
ok 1 - POST /login
ok 2 - 302 Found
ok 3 - Should login?
ok 4 - GET /api/1.2/server/100/configfiles/ats
ok 5 - 200 OK
ok 6
ok 7 - GET /api/1.2/server/100/configfiles/ats/12M_facts
ok 8 - 200 OK
ok 9
ok 10 - GET /api/1.2/server/100/configfiles/ats/ip_allow.config
ok 11 - 200 OK
ok 12
ok 13 - GET /api/1.2/server/100/configfiles/ats/crontab_root
ok 14 - 200 OK
ok 15
ok 16 - GET /api/1.2/server/100/configfiles/ats/remap.config
ok 17 - 200 OK
ok 18
ok 19 - GET /api/1.2/server/100/configfiles/ats/parent.config
ok 20 - 200 OK
ok 21
ok 22 - GET /api/1.2/server/100/configfiles/ats/cache.config
ok 23 - 200 OK
ok 24
ok 25 - GET /api/1.2/server/100/configfiles/ats/hosting.config
ok 26 - 200 OK
ok 27
ok 28 - GET /api/1.2/cdn/cdn1/configfiles/ats/cacheurl.config
ok 29 - 200 OK
ok 30
ok 31 - GET /api/1.2/cdn/cdn1/configfiles/ats/regex_revalidate.config
ok 32 - 200 OK
ok 33
ok 34 - GET /api/1.2/cdn/cdn1/configfiles/ats/hdr_rw_cdl-c2.config
not ok 35 - 200 OK
# Failed test '200 OK'
# at ./t/api/1.2/config_files_apache_traffic_server.t line 57.
# got: '400'
# expected: '200'
# {"alerts":[{"level":"error","text":"Error - incorrect file scope for
route used. Please use the server route."}]}
ok 36
ok 37 - GET /api/1.2/profile/100/configfiles/ats/50-ats.rules
ok 38 - 200 OK
ok 39
ok 40 - GET /api/1.2/profile/100/configfiles/ats/drop_qstring.config
ok 41 - 200 OK
ok 42
ok 43 - GET /api/1.2/profile/100/configfiles/ats/volume.config
ok 44 - 200 OK
ok 45
ok 46 - GET /api/1.2/profile/100/configfiles/ats/astats.config
ok 47 - 200 OK
ok 48
ok 49 - GET /api/1.2/profile/100/configfiles/ats/storage.config
ok 50 - 200 OK
ok 51
ok 52 - GET /api/1.2/deliveryservices/list?logsEnabled=true
ok 53 - 200 OK
ok 54
DBIx::Class::ResultSet::_resolved_attrs(): Useless use of distinct on a
grouped resultset ('distinct' is ignored when a 'group_by' is present) at
/home/jvd/work/gh/knutsel/incubator-trafficcontrol/traffic_ops/app/lib/UI/Topology.pm
line 79
ok 55 - PUT /api/1.2/snapshot/cdn1
ok 56 - 200 OK
ok 57
ok 58 - GET /logout
ok 59 - 302 Found
ok 60
1..60
# Looks like you failed 1 test of 60.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/60 subtests
Test Summary Report
-------------------
./t/api/1.2/config_files_apache_traffic_server.t (Wstat: 256 Tests: 60
Failed: 1)
Failed test: 35
Non-zero exit status: 1
Files=1, Tests=60, 6 wallclock secs ( 0.04 usr 0.01 sys + 4.14 cusr
0.83 csys = 5.02 CPU)
Result: FAIL
[jvd@jvd-knutsel-4 app (master *$>)]$`
> Improve efficiency of ATS config generation
> -------------------------------------------
>
> Key: TC-32
> URL: https://issues.apache.org/jira/browse/TC-32
> Project: Traffic Control
> Issue Type: Improvement
> Components: Traffic Ops API
> Reporter: Derek Gelinas
> Assignee: Derek Gelinas
> Fix For: 1.9.0
>
>
> Currently when generating ATS configuration files, each server calls for its
> individual files from traffic ops. This is a very database-intensive process
> that is not scalable enough. I propose the following changes:
> 1) Generate the configuration files only as many times as needed - many files
> are the same (or can be) for the entire CDN or server profile.
> 2) Once generated, the files can be cached locally. Requests for the files
> by ORT will result in pulling down these cached files rather than many
> hundreds of DB queries each time.
> 3) Migrate the routes for these files to the API. Each call will have
> multiple options - a request made with no options would return the cached
> file, another option would return the current DB data, and a third option
> would update the cached file with the current information in the DB.
> 4) When an update is queued, generate and cache the configuration files, then
> activate the update flag for the relevant servers once the cached file
> generation is completed.
> In this way, triggering updates for the caches will result in an initial
> increase in activity as traffic ops generates the files needed, followed by
> the much lower impact of the files themselves being requested by the caches.
> I believe we can cut down the number of server-specific configuration files
> to only 5 intially, and potentially fewer by having ORT fill in certain
> fields on files like records.config with local data during processing.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)