-
Notifications
You must be signed in to change notification settings - Fork 344
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
added anycast traffic routing ability, and lastpoll time for v6 #7302
Conversation
updated docs refactor datareq/crstate.go updated changelog update results with hostname from via header, if exists
Codecov Report
@@ Coverage Diff @@
## master #7302 +/- ##
============================================
+ Coverage 25.02% 25.15% +0.13%
Complexity 98 98
============================================
Files 593 593
Lines 73528 73768 +240
Branches 90 90
============================================
+ Hits 18398 18554 +156
- Misses 53383 53459 +76
- Partials 1747 1755 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
This looks on the right track. Thanks!
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 closer, just a few things left. Thanks!
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.
Docs look good
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.
It's getting close! What tests can be written for this feature? See the Codecov comments for which lines of code it detects are not covered by any tests.
Unit tests are preferable, if that is an option. That would probably also be simpler than getting 2 servers to have the same IP address in the TM integration tests.
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.
Thanks for adding tests! Just a few things left to be addressed, I think.
Sorry I'm so late to the game. This feels like quite a significant change to TM and I worry we don't have the proper test suite in place to verify such a change. I would propose either:
|
…adjustments by default
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.
Thanks! Some questions about the Threshold
type and the new parameter.
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.
Looking close, mainly we just need to make sure that tm.sameipservers.control
being disabled/enabled is observed everywhere where it's relevant.
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.
Thanks for the updates, I have some more feedback based on that.
@@ -79,6 +79,7 @@ traffic_monitor.cfg | |||
- ``health.polling.interval`` | |||
- ``peers.polling.interval`` | |||
- ``heartbeat.polling.interval`` | |||
- ``tm.sameipservers.control`` - When set to true, performs an AND operation on the availability statuses of servers with same ip. Any unavailable server(s) with same ip as other server(s) will cause the other server(s) to be set to unavailable. |
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.
tm.sameipservers.control
is a little ambiguous how about tm.sameipservers.enabled
? We use .enabled
for parameters elsewhere in the project.
if val, ok := monitorConfig.Get().Config["tm.sameipservers.control"]; ok && val.(string) == "true" { | ||
localStatesC := updateStatusSameIpServers(localStates, toData) | ||
if !directlyPolledOnly { | ||
return tc.CRStatesMarshall(localStatesC) | ||
} | ||
return tc.CRStatesMarshall(filterDirectlyPolledCaches(localStatesC)) | ||
} | ||
if !directlyPolledOnly { | ||
return tc.CRStatesMarshall(localStates.Get()) | ||
} | ||
unfiltered := localStates.Get() | ||
return tc.CRStatesMarshall(filterDirectlyPolledCaches(unfiltered)) | ||
return tc.CRStatesMarshall(filterDirectlyPolledCaches(localStates.Get())) |
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.
How about something like this to reduce code duplication?
var unfiltered tc.CRStates
if val, ok := monitorConfig.Get().Config["tm.sameipservers.control"]; ok && val.(string) == "true" {
unfiltered = updateStatusSameIpServers(localStates, toData)
} else {
unfiltered = localStates.Get()
}
if !directlyPolledOnly {
return tc.CRStatesMarshall(unfiltered)
}
return tc.CRStatesMarshall(unfiltered)
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.
Approving and merging now, provided you make the requested changes in a follow-up PR.
…v6 (apache#7302)" This reverts commit 0e2b42f.
These changes enable TM to poll caches that have the same ip address and are in ecmp on the same router, and direct traffic to them appropriately.
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
create two caches with the same service v4 and v6 address that are connected to the same router with ecmp enabled on the route to them aka you should be able to get to both caches with repeated curls
Disable keep alives so that TM pick a new port each time they connect to the caches
PR submission checklist