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

Conversation

@rob05c
Copy link
Member

@rob05c rob05c commented Oct 28, 2022

Fixes t3c generation when servers have multiple profiles. The bug was a shared loop variable being overwritten in the TO request.

This is a 1-line fix, but it can't be unit tested because the bug was in the actual TO request, and the t3c Integration Tests are still on TO API v3 which doesn't have multiple Profiles. So testing this required updating the framework to v4, which is done in #7167 .

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?

Run tests. Generate config on a server with multiple profiles, verify config is as-expected and all profiles have their parameters applied as-expected.

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

  • 7.0.x

PR submission checklist

  • [ ] This PR has tests tests can't be written until the t3c integration framework is upgraded to v3, which is a considerable amount of work
  • [ ] This PR has documentation no docs, no interface change
  • This PR has a CHANGELOG.md entry
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@rob05c rob05c added bug something isn't working as intended cache-config Cache config generation labels Oct 28, 2022
@rob05c rob05c marked this pull request as ready for review October 28, 2022 16:48
@rob05c rob05c force-pushed the fix-t3c-multiple-profile-generation branch 3 times, most recently from 11b858d to 835a7b5 Compare October 28, 2022 17:17
@zrhoffman zrhoffman added the high impact impacts the basic function, deployment, or operation of a CDN label Oct 28, 2022
@rob05c rob05c force-pushed the fix-t3c-multiple-profile-generation branch 3 times, most recently from 2c052b3 to 0383804 Compare November 1, 2022 14:34
Fixes a t3c bug resulting in only params from the last profile when
multiple profiles are assigned.

The bug was a go for loop overwriting the loop variable which was
stored, required a copy of the iteration variable.
@rob05c rob05c force-pushed the fix-t3c-multiple-profile-generation branch from 0383804 to a9b40ef Compare November 1, 2022 14:42
@zrhoffman zrhoffman added low impact affects only a small portion of a CDN, and cannot itself break one and removed high impact impacts the basic function, deployment, or operation of a CDN labels Nov 1, 2022
@rob05c
Copy link
Member Author

rob05c commented Nov 1, 2022

I don't think this is really low-impact. It breaks config gen for all servers with multiple profiles assigned

@rob05c rob05c added high impact impacts the basic function, deployment, or operation of a CDN and removed low impact affects only a small portion of a CDN, and cannot itself break one labels Nov 1, 2022
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.

This looks good. A proper fix.

@ocket8888 ocket8888 merged commit 67a5641 into apache:master Nov 4, 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 high impact impacts the basic function, deployment, or operation of a CDN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants