-
Notifications
You must be signed in to change notification settings - Fork 3.4k
ctmap,daemon: Exclude host IPs from conntrack GC during startup #19998
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
Conversation
66583b7
to
721ef47
Compare
@pchaigno |
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.
I found some typos, but otherwise, looks good to me.
721ef47
to
1841658
Compare
@@ -30,7 +31,8 @@ type EndpointManager interface { | |||
} | |||
|
|||
// Enable enables the connection tracking garbage collection. | |||
func Enable(ipv4, ipv6 bool, restoredEndpoints []*endpoint.Endpoint, mgr EndpointManager) { | |||
func Enable(ipv4, ipv6 bool, restoredEndpoints []*endpoint.Endpoint, mgr EndpointManager, | |||
nodeAddressing types.NodeAddressing) { |
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.
A bit of a nit but it would be nice to comment or document which of these arguments are used for GC filtering.
When the host firewall is enabled, we start tracking (and potentially enforcing policies) on all connections to and from the host IP addresses. Thus, we also need to avoid GCing the host IPs. If we don't it can cause established connections to be broken on agent restart. Reported-by: Andrey Klimentyev <andrey.klimentyev@flant.com> Reported-by: Jarno Rajahalme <jarno@isovalent.com> Signed-off-by: Paul Chaignon <paul@cilium.io>
1841658
to
722cf3e
Compare
/test |
🤔 I'm confused, how do we garbage collect host IPs now? Won't this just lead to the CT table being full of expired entries corresponding to host connections? |
@joestringer We only skip host IPs for the initial scan ( |
When the host firewall is enabled, we start tracking (and potentially enforcing policies) on all connections to and from the host IP addresses. Thus, we also need to avoid GCing the host IPs. If we don't it can cause established connections to be broken on agent restart.
Fixes: #19367.