You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "ezelkow1 (via GitHub)" <gi...@apache.org> on 2023/06/15 16:44:13 UTC
[GitHub] [trafficcontrol] ezelkow1 opened a new pull request, #7580: Add maxmind anonymous download option to t3c
ezelkow1 opened a new pull request, #7580:
URL: https://github.com/apache/trafficcontrol/pull/7580
<!--
Thank you for contributing! Please be sure to read our contribution guidelines: https://github.com/apache/trafficcontrol/blob/master/CONTRIBUTING.md
If this closes or relates to an existing issue, please reference it using one of the following:
Closes: #ISSUE
Related: #ISSUE
If this PR fixes a security vulnerability, DO NOT submit! Instead, contact
the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
guidelines at https://apache.org/security regarding vulnerability disclosure.
-->
This adds a `-Y` option to t3c to download the maxmind anonymous database along side or by itself with the other maxmind database
<!-- **^ Add meaningful description above** --><hr/>
## Which Traffic Control components are affected by this PR?
<!-- Please delete all components from this list that are NOT affected by this PR.
Feel free to add the name of a tool or script that is affected but not on the list.
-->
- Traffic Control Cache Config (`t3c`, formerly ORT)
## What is the best way to verify this PR?
<!-- Please include here ALL the steps necessary to test your PR.
If your PR has tests (and most should), provide the steps needed to run the tests.
If not, please provide step-by-step instructions to test the PR manually and explain why your PR does not need tests. -->
Do a t3c run with the -Y option and a URL that is hosting a maxmind database, ensure it is downloaded and un-gzipped in to the ATS location
## PR submission checklist
- [x] This PR has tests <!-- If not, please delete this text and explain why this PR does not need tests. -->
- [x] This PR has documentation <!-- If not, please delete this text and explain why this PR does not need documentation. -->
- [x] This PR has a CHANGELOG.md entry <!-- A fix for a bug from an ATC release, an improvement, or a new feature should have a changelog entry. -->
- [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://apache.org/security) for details)
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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.
-->
--
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: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] ezelkow1 commented on pull request #7580: Add maxmind anonymous download option to t3c
Posted by "ezelkow1 (via GitHub)" <gi...@apache.org>.
ezelkow1 commented on PR #7580:
URL: https://github.com/apache/trafficcontrol/pull/7580#issuecomment-1599610239
Actually I may rework this to take a comma separated list of URLs instead of tacking on another option since some people just want to be able to grab multiple db's at once
--
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: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] ocket8888 commented on pull request #7580: Add maxmind anonymous download option to t3c
Posted by "ocket8888 (via GitHub)" <gi...@apache.org>.
ocket8888 commented on PR #7580:
URL: https://github.com/apache/trafficcontrol/pull/7580#issuecomment-1593468530
the new option should be added to the documentation
--
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: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] shamrickus merged pull request #7580: Change t3c -M option to take a comma separated list
Posted by "shamrickus (via GitHub)" <gi...@apache.org>.
shamrickus merged PR #7580:
URL: https://github.com/apache/trafficcontrol/pull/7580
--
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: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] ezelkow1 commented on pull request #7580: Add maxmind anonymous download option to t3c
Posted by "ezelkow1 (via GitHub)" <gi...@apache.org>.
ezelkow1 commented on PR #7580:
URL: https://github.com/apache/trafficcontrol/pull/7580#issuecomment-1593474708
> the new option should be added to the documentation
thanks, added to the t3c-apply docs
--
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: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] traeak commented on a diff in pull request #7580: Change t3c -M option to take a comma separated list
Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on code in PR #7580:
URL: https://github.com/apache/trafficcontrol/pull/7580#discussion_r1238576675
##########
cache-config/t3c-apply/t3c-apply.go:
##########
@@ -397,20 +398,27 @@ func CheckMaxmindUpdate(cfg config.Cfg) bool {
// Check if we have a URL for a maxmind db
// If we do, test if the file exists, do IMS based on disk time
// and download and unpack as needed
- result := false
+ retresult := false
if cfg.MaxMindLocation != "" {
// Check if the maxmind db needs to be updated before reload
- result = util.UpdateMaxmind(cfg)
- if result {
- log.Infoln("maxmind database was updated from " + cfg.MaxMindLocation)
- } else {
- log.Infoln("maxmind database not updated. Either not needed or curl/gunzip failure")
+ MaxMindList := strings.Split(cfg.MaxMindLocation, ",")
+ for _, v := range MaxMindList {
+ result := util.UpdateMaxmind(v, cfg.TsConfigDir, cfg.ReportOnly)
+ if result {
+ log.Infoln("maxmind database was updated from " + v)
+ } else {
+ log.Infoln("maxmind database not updated. Either not needed or curl/gunzip failure")
Review Comment:
If this fails is the failing maxmind DB identified? Perhaps add to the comment.
--
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: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] codecov[bot] commented on pull request #7580: Add maxmind anonymous download option to t3c
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7580:
URL: https://github.com/apache/trafficcontrol/pull/7580#issuecomment-1593403657
## [Codecov](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#7580](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (4282ec4) into [master](https://app.codecov.io/gh/apache/trafficcontrol/commit/2e995e734d4eeade97616cd486e000cae2038035?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (2e995e7) will **increase** coverage by `0.30%`.
> The diff coverage is `44.16%`.
```diff
@@ Coverage Diff @@
## master #7580 +/- ##
============================================
+ Coverage 27.74% 28.04% +0.30%
Complexity 98 98
============================================
Files 686 385 -301
Lines 78128 35235 -42893
Branches 90 90
============================================
- Hits 21675 9882 -11793
+ Misses 54396 24351 -30045
+ Partials 2057 1002 -1055
```
| Flag | Coverage Δ | |
|---|---|---|
| golib_unit | `48.59% <66.07%> (+0.03%)` | :arrow_up: |
| grove_unit | `4.60% <ø> (ø)` | |
| t3c_unit | `5.30% <2.04%> (-0.02%)` | :arrow_down: |
| traffic_monitor_unit | `21.35% <ø> (ø)` | |
| traffic_ops_unit | `?` | |
| traffic_stats_unit | `10.14% <ø> (ø)` | |
| unit_tests | `25.59% <36.19%> (+1.18%)` | :arrow_up: |
| v3 | `?` | |
| v4 | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [cache-config/t3c-apply/config/config.go](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2FjaGUtY29uZmlnL3QzYy1hcHBseS9jb25maWcvY29uZmlnLmdv) | `0.00% <0.00%> (ø)` | |
| [cache-config/t3c-apply/t3c-apply.go](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2FjaGUtY29uZmlnL3QzYy1hcHBseS90M2MtYXBwbHkuZ28=) | `0.00% <0.00%> (ø)` | |
| [cache-config/t3c-apply/torequest/cmd.go](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2FjaGUtY29uZmlnL3QzYy1hcHBseS90b3JlcXVlc3QvY21kLmdv) | `0.00% <0.00%> (ø)` | |
| [cache-config/t3c-apply/util/util.go](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2FjaGUtY29uZmlnL3QzYy1hcHBseS91dGlsL3V0aWwuZ28=) | `4.82% <0.00%> (ø)` | |
| [cache-config/t3c-generate/config/config.go](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2FjaGUtY29uZmlnL3QzYy1nZW5lcmF0ZS9jb25maWcvY29uZmlnLmdv) | `0.83% <0.00%> (-0.06%)` | :arrow_down: |
| [cache-config/t3c-generate/cfgfile/wrappers.go](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2FjaGUtY29uZmlnL3QzYy1nZW5lcmF0ZS9jZmdmaWxlL3dyYXBwZXJzLmdv) | `49.45% <50.00%> (+<0.01%)` | :arrow_up: |
| [lib/go-atscfg/parentdotconfig.go](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliL2dvLWF0c2NmZy9wYXJlbnRkb3Rjb25maWcuZ28=) | `65.76% <64.15%> (-0.48%)` | :arrow_down: |
| [lib/go-atscfg/parentabstraction.go](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliL2dvLWF0c2NmZy9wYXJlbnRhYnN0cmFjdGlvbi5nbw==) | `80.00% <100.00%> (ø)` | |
| [lib/go-atscfg/strategiesdotconfig.go](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bGliL2dvLWF0c2NmZy9zdHJhdGVnaWVzZG90Y29uZmlnLmdv) | `91.86% <100.00%> (+0.07%)` | :arrow_up: |
| [traffic\_ops/v5-client/coordinate.go](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dHJhZmZpY19vcHMvdjUtY2xpZW50L2Nvb3JkaW5hdGUuZ28=) | `100.00% <100.00%> (ø)` | |
| ... and [1 more](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
... and [302 files with indirect coverage changes](https://app.codecov.io/gh/apache/trafficcontrol/pull/7580/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
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: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org