-
Notifications
You must be signed in to change notification settings - Fork 386
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
Truncate SessionAffinity timeout values instead of wrapping around #3609
Truncate SessionAffinity timeout values instead of wrapping around #3609
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3609 +/- ##
===========================================
- Coverage 64.24% 46.84% -17.40%
===========================================
Files 278 245 -33
Lines 27929 35482 +7553
===========================================
- Hits 17942 16623 -1319
- Misses 8067 17221 +9154
+ Partials 1920 1638 -282
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/test-all |
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.
LGTM, a typo
pkg/agent/proxy/proxier.go
Outdated
// let the timeout value wrap around. | ||
affinityTimeout = maxSupportedAffinityTimeout | ||
if !ok || (svcInfo.StickyMaxAgeSeconds() != pSvcInfo.StickyMaxAgeSeconds()) { | ||
// We only log a warning when the Service hasn't been instealled |
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.
// We only log a warning when the Service hasn't been instealled | |
// We only log a warning when the Service hasn't been installed |
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.
LGTM
SessionAffinity timeout is implemented using a hard_timeout in OVS. hard_timeout is represented by a uint16 in the OpenFlow protocol, hence we cannot support timeouts greater than 65535 seconds. However, the K8s Service spec allows timeout values up to 86400 seconds for ClientIP-based SessionAffinity (https://godoc.org/k8s.io/api/core/v1#ClientIPConfig). For values greater than 65535 seconds, we need to set the hard_timeout to 65535 rather than let the timeout value wrap around. For antrea-io#1578 Signed-off-by: Antonin Bas <abas@vmware.com>
f6c2a3d
c3229ed
to
f6c2a3d
Compare
/test-all |
SessionAffinity timeout is implemented using a hard_timeout in
OVS. hard_timeout is represented by a uint16 in the OpenFlow protocol,
hence we cannot support timeouts greater than 65535 seconds. However,
the K8s Service spec allows timeout values up to 86400 seconds for
ClientIP-based SessionAffinity
(https://godoc.org/k8s.io/api/core/v1#ClientIPConfig). For values
greater than 65535 seconds, we need to set the hard_timeout to 65535
rather than let the timeout value wrap around.
For #1578
Signed-off-by: Antonin Bas abas@vmware.com