New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Cache-Side Config Generator #3762
Conversation
Refer to this link for build results (access rights to CI server needed): |
ee858cf
to
c4151ab
Compare
Refer to this link for build results (access rights to CI server needed): |
c4151ab
to
1a85575
Compare
Refer to this link for build results (access rights to CI server needed): |
1a85575
to
181f2fa
Compare
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, ran some comparison tests and go tests. Docs could just use a rewrite
78d721f
to
0092849
Compare
Addressed PR comments, fixed merge conflicts. |
Refer to this link for build results (access rights to CI server needed): |
retest this please |
Refer to this link for build results (access rights to CI server needed): |
0092849
to
0a35305
Compare
Refer to this link for build results (access rights to CI server needed): |
License header problems:
|
It also doesn't like the license of your
|
Where did we land on the idea to share code between the new atstccfg tool and the API and just replacing DB queries w/ API calls? Are we doing that? |
Refer to this link for build results (access rights to CI server needed): |
a0dcbe7
to
e22d392
Compare
Fixed. |
All the logic is shared, in |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Yeah, I don't think it's necessary to try to use the API within TO. Thanks! |
e22d392
to
d6c1ca9
Compare
Refer to this link for build results (access rights to CI server needed): |
d6c1ca9
to
d1497df
Compare
Refer to this link for build results (access rights to CI server needed): |
Adds a client-side ATS config gen interceptor to ORT, with an initial parent.config gen and passing everything else to TO. Plan is to add all configs to be client-side generated.
Also adds a client function to specify server and DS IDs, as well as a missing client func for the existing deliveryservice?cdn param.
For debugging, or emergencies.
Also changes atstccfg to do things ORT needed: - changed to return the HTTP code as the exit code, on error - added CLI option to return which configs are generated (vs proxied) - added retry num option, for failed TO attempts - changed to use lib/tc-log, and take args for where to log - fixed missing license headers - added integrity check via SHA512 or Content-length headers
d1497df
to
d5bd5f3
Compare
Refer to this link for build results (access rights to CI server needed): |
What does this PR (Pull Request) do?
Adds a cache-side config generator. This is a small go binary (
atstccfg
), which ORT calls instead of requesting Traffic Ops. Theatstccfg
generator then generates configs it can, and proxies to TO for configs it can't yet generate.This PR includes generating
parent.config
and allprofile
configs, with everything else being proxied. The plan is to move configs over one at a time, until all configs are generated cache-side.See https://cwiki.apache.org/confluence/display/TC/Cache-Side+Config+Generation
It also moves the logic into
/lib/go-atscfg
, a library that can be used if someone wants to generate configs themselves somewhere else.I've parity-tested the generated configs, against Traffic Ops generation, on all our production edges, mids, and profiles. They all diff identical (except where order is nondeterministic in Perl).
Includes documentation, explaining the new config generation, what's generated where and how.
Includes unit tests.
Includes Changelog.
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Install ORT, run, verify config files match previous versions / TO.
If this is a bug fix, what versions of Traffic Control are affected?
Not a bug fix.
The following criteria are ALL met by this PR