Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

use a comma separated list of IPs for purge_allow_ip#7233

Merged
ocket8888 merged 4 commits intoapache:masterfrom
jpappa200:ipallow_sort
Dec 14, 2022
Merged

use a comma separated list of IPs for purge_allow_ip#7233
ocket8888 merged 4 commits intoapache:masterfrom
jpappa200:ipallow_sort

Conversation

@jpappa200
Copy link
Contributor

Closes: #7232
If a profile has multiple parameters with the same name and config file, the layered profile approach will only use one parameter. this has become an issue with ip_allow.yaml because we add multiple single IPs to allow purge from all Traffic Ops servers.
I have updated ipallowdotyaml.go to handle a comma separated list of IP addresses in a single parameter.


Which Traffic Control components are affected by this PR?

  • Traffic Control Cache Config (t3c, formerly ORT)

What is the best way to verify this PR?

create a parameter Name: purge_allow_ip Config File: ip_allow.config Value: comma separated list of IPs. associate new parameter with a profile and remove all other purge_allow_ip parameters. Queue updates and run t3c. when finished you should see all IPs allowing purge and if you queue and run again ip_allow.yaml doesn't change.

If this is a bugfix, which Traffic Control versions contained the bug?

PR submission checklist

@codecov
Copy link

codecov bot commented Dec 6, 2022

Codecov Report

❗ No coverage uploaded for pull request base (master@9a76c99). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #7233   +/-   ##
=========================================
  Coverage          ?   24.63%           
=========================================
  Files             ?      422           
  Lines             ?    62600           
  Branches          ?        0           
=========================================
  Hits              ?    15424           
  Misses            ?    45650           
  Partials          ?     1526           
Flag Coverage Δ
golib_unit 53.09% <0.00%> (?)
grove_unit 4.60% <0.00%> (?)
t3c_generate_unit 24.96% <0.00%> (?)
traffic_monitor_unit 20.43% <0.00%> (?)
traffic_ops_unit 19.81% <0.00%> (?)
traffic_stats_unit 10.41% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ocket8888 ocket8888 added bug something isn't working as intended medium impact impacts a significant portion of a CDN, or has the potential to do so cache-config Cache config generation labels Dec 6, 2022
Copy link
Contributor

@ocket8888 ocket8888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, separating by lines may be easier to read, and is pretty unix-like-standard. Just one man's opinion.

Copy link
Contributor

@traeak traeak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay. Document does mention to use a parameter with comma separated ips to specify multiple addresses.

@ocket8888 ocket8888 merged commit 0f9f4c9 into apache:master Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug something isn't working as intended cache-config Cache config generation medium impact impacts a significant portion of a CDN, or has the potential to do so

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t3c doesn't add multiple purge_allow_ip parameters to ip_allow.yaml

3 participants