-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Fixing refcounting of remote endpoints used across services #91706
Fixing refcounting of remote endpoints used across services #91706
Conversation
Hi @sbangari. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
@sbangari: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/sig windows |
/retest |
1 similar comment
/retest |
fc3b383
to
0760c04
Compare
/retest |
1 similar comment
/retest |
0760c04
to
cd43fc9
Compare
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: madhanrm, sbangari The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
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
/LGTM |
@kumarvin123: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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
What type of PR is this?
/kind bug
What this PR does / why we need it:
In kube-proxy a ref count is maintained on the remote endpoints created for a service. The remote endpoints are deleted from HNS when they are no longer in use by kube-proxy (i.e. refcount is dropped to zero). In the current logic the refcount on the remote endpoints is scoped to a service. So when the service is deleted all the remote endpoints referred by it are no longer in use and they are cleaned up dropping the refcount to 0. This deletes the remote endpoints in HNS. When a remote endpoint is shared across two services this causes a problem since the second service is still referring to it, but the backing HNS remote endpoint is deleted and no longer available.
Fix: A global refcount is maintained for all the remote endpoints created across services. The backing HNS remote endpoint is only deleted when it is no longer in use by any service.
Which issue(s) this PR fixes:
Fixes #91703
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: