Skip to content
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

SessionAffinity timeout max value #1578

Open
antoninbas opened this issue Nov 19, 2020 · 4 comments
Open

SessionAffinity timeout max value #1578

antoninbas opened this issue Nov 19, 2020 · 4 comments
Labels
area/ovs Issues or PRs related to OVS kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. wontfix This will not be worked on

Comments

@antoninbas
Copy link
Contributor

Describe the bug
According to the K8s API documentation, the maximum value for service.spec.sessionAffinityConfig.clientIP.timeoutSeconds is 86400, which corresponds to 1 day. See https://godoc.org/k8s.io/api/core/v1#ClientIPConfig.

In Antrea, the maximum value is actually 65535, since this timeout is implemented using an OpenFlow hard timeout, which is a uint16.

I am not sure there is too much we can do about this, except for documenting this limitation somewhere.

Versions:

  • Antrea version: v0.11 and ToT
@antoninbas antoninbas added kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. area/ovs Issues or PRs related to OVS labels Nov 19, 2020
@github-actions
Copy link
Contributor

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 19, 2021
@antoninbas antoninbas removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 19, 2021
@github-actions
Copy link
Contributor

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 16, 2021
@antoninbas antoninbas removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 29, 2021
@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment, or this will be closed in 90 days

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 28, 2022
@antoninbas antoninbas removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 28, 2022
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 9, 2022
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>
antoninbas added a commit to antoninbas/antrea that referenced this issue Apr 12, 2022
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>
antoninbas added a commit that referenced this issue Apr 13, 2022
…3609)

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>
@antoninbas antoninbas added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. wontfix This will not be worked on labels Apr 13, 2022
@antoninbas
Copy link
Contributor Author

antoninbas commented Apr 13, 2022

Since #3609, we do the following when the user-provided timeout exceeds the maximum supported value (65535):

  1. Log a warning
  2. Truncate the user-provided timeout to the maximum supported value

Freezing this issue and tagging it as "wontfix" because this is not something we can resolve further without a huge effort, and using a timeout larger than 65535 seconds is probably a very niche scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ovs Issues or PRs related to OVS kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant