-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Clean up stale ENI rules upon endpoint deletion #11163
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
Clean up stale ENI rules upon endpoint deletion #11163
Conversation
Please set the appropriate release note label. |
6ee91f7
to
699cbdb
Compare
699cbdb
to
3c56387
Compare
test-me-please |
3c56387
to
feb589f
Compare
test-me-please |
feb589f
to
ac42c62
Compare
test-me-please |
ac42c62
to
d77765f
Compare
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.
All of the below are just minor nits that would help code maintainability for the future.
b4c6885
to
133a129
Compare
test-me-please |
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. Go mod bot looks like legitimate change needed but modulo that I think we're good to merge.
133a129
to
119cbe1
Compare
test-me-please |
119cbe1
to
c53a64a
Compare
test-me-please Edit: provisioning failure https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/19357/ |
test-me-please |
Build green. Editing commit message mentioned to tag issue number. |
Currently, this facility doesn't exist in the upstream netlink library (https://github.com/vishvananda/netlink). This commit adds it here so that we don't have to wait to utilize it when it's merged. Once it's merged, then we can replace this. Signed-off-by: Chris Tarazi <chris@isovalent.com>
This makes log messages containing the rule much easier to read when debugging. Signed-off-by: Chris Tarazi <chris@isovalent.com>
Previously, ENI rules were created, but never cleaned up. This can result in an increasing number of stale rules over the lifetime of a node. This commit adds the ability to delete these rules (ingress and egress). Note that routes are deliberately not deleted as they can be reused for future endpoints on the same node. This is due to the routes being created with the ENI device "ifindex" as the table ID. Fixes cilium#11041 Signed-off-by: Chris Tarazi <chris@isovalent.com>
Signed-off-by: Chris Tarazi <chris@isovalent.com>
c53a64a
to
e22f554
Compare
FWIW, in case someone here from commit message is trying to clean up stale ip rules, this may save you some effort:
|
@jaffcheng Nice! I'll also point you to https://github.com/cilium/stale-rules 😉. |
@christarazi Thanks! I should have found that earlier 😄 . |
See commit messages, reviewable per-commit.
Note: commits starting with "dropme!" are meant to be dropped for the final change. These changes are pending in #11073. They can be ignored for the review.
TODO:
ifindex
from function arg toenirouting.Delete
(as it is always-1
anyway)Fixes: #11041