-
-
Notifications
You must be signed in to change notification settings - Fork 73
Ipcache reopen on cilium restart #785
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
ebcb69f to
178cc0f
Compare
178cc0f to
f6c553b
Compare
mhofstetter
left a comment
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 - thanks for the detailed commit messages!
Does the same issue exist with the conntrack map? (or does the Agent behaves differently for this map(s) (global & local)?
AFAIK conntrack maps are not recreated on agent restart. CT maps are populated by the datapath, so it would be rather hard to create a new one from the userspace. |
f6c553b to
8695b08
Compare
|
Also had to move the reopen to happen even if there is no difference in the policy! |
Date: 2024-05-31 16:38:45 +0200 Author: Jarno Rajahalme <[email protected]> Date: 2024-05-31 16:32:26 +0200 bpf: Allow reopening a map close any possible existing map before opening a new one. This allows Open() to be called again to reopen the map. Store the path passed to open() for later re-try during lookup(), it the open failed. Signed-off-by: Jarno Rajahalme <[email protected]>
Move ipcache singleton management from bpf_metadata.cc to ipcache.cc so that the sigleton can be accessed without going through bpf_metadata. This avoids Bazel import cycle in following commits. Add a new static methods to ipcache to create and get the singleton. Signed-off-by: Jarno Rajahalme <[email protected]>
Make server factory context available by storing it in a member. Signed-off-by: Jarno Rajahalme <[email protected]>
Add GrpcMuxImpl wrapper class to get access to onStreamEstablished(), and implement isNewStream() that returns 'true' on the first call after a new stream has been established. Signed-off-by: Jarno Rajahalme <[email protected]>
Reopen ipcache map each time after a new gRPC stream has been established for Network Policy Discovery Service. This is necessary to get access to the new IP Cache map Cilium Agent creates on restart. Signed-off-by: Jarno Rajahalme <[email protected]>
8695b08 to
73dc7da
Compare
Reopen ipcache whenever a new NetworkPolicy stream is opened. This way we get access to the new ipcache after cilium agent restart.