rawlinp opened a new pull request #5133: URL: https://github.com/apache/trafficcontrol/pull/5133
## What does this PR (Pull Request) do? In Traffic Router, set a cache to unavailable if it's not found in the TM health data (CrStates). Otherwise, when a cache is set to OFFLINE and removed from TM health data, there is a short window where TR sets it to available until it has finished processing the new snapshot. OFFLINE caches should never be considered available. ## Which Traffic Control components are affected by this PR? - Traffic Router ## What is the best way to verify this PR? This is a race condition, which makes it difficult to verify manually, but it can be attempted by: 1. Assign a DS to a single cache 2. Repeatedly request the DS 3. Set the cache to ADMIN_DOWN, snapshot (TR should be returning 5xx shortly) 4. Set the cache to OFFLINE, snapshot Without this fix, you might be able to get TR to 302 to the offlined cache for a short period until TR has finished processing the new snapshot. With this fix, that should not happen. ## If this is a bug fix, what versions of Traffic Control are affected? - master - 4.x - 3.x ## The following criteria are ALL met by this PR - [x] This section of the code currently lacks tests, but I did manually verify the expected behavior before/after - [x] bug fix, no docs necessary - [x] This PR includes an update to CHANGELOG.md - [x] This PR includes any and all required license headers - [x] This PR does not include a database migration - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details) ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
