-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Endpoint policy before restoration #36433
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
Merged
jrajahalme
merged 4 commits into
cilium:main
from
jrajahalme:endpoint-policy-before-restoration
Jan 14, 2025
Merged
Endpoint policy before restoration #36433
jrajahalme
merged 4 commits into
cilium:main
from
jrajahalme:endpoint-policy-before-restoration
Jan 14, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a61a122
to
f3c7e69
Compare
/test |
f3c7e69
to
8dd87a8
Compare
/test |
8dd87a8
to
4d36bda
Compare
/test |
4d36bda
to
ac91218
Compare
/test |
ac91218
to
acae7a4
Compare
/test |
acae7a4
to
608932e
Compare
/test |
608932e
to
c1e09bb
Compare
/test |
c1e09bb
to
60eb197
Compare
/test |
60eb197
to
3872308
Compare
doniacld
approved these changes
Jan 9, 2025
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.
Great work! 👏🏽 LGTM with the last commit
christarazi
reviewed
Jan 9, 2025
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.
Nice work! A few comments to address.
Compute endpoint policy before scheduling bpf regeneration. This may allow for faster initial proxy policy sync with Envoy and thus make 'toFQDNs' policies more responsive during Cilium Agent restarts. With this endpoint's desiredPolicy may already be computed when the endpoint is queued for regeneration. This has two consequences: 1. The version handle of the desired policy may not have been closed when endpoint is removed while it is waiting to be regenerated. Thus we need to mark the desired policy as 'Ready' when removing the endpoint to avoid warning logs. 2. Endpoint's policy may get updated while it is waiting to get regererated. If this happens the policy needs to be recomputed when endoint regeneration is started. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
…ation Only pre-compute endpoint policy on first regeneration. This avoids extra work if the endpoint policy gets updated while it is waiting to be regenerated. Start serving xDS resources to Envoy as soon as the policies of all restored endopoints have been computed, rather than waiting for them to have been fully restored. This allows Envoy to get policy updates sooner on restart. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
Add an optional stacktrace to VersionHandle, which is set if debug is enabled. This is logged if a VersionHandle finalizer is needed for cleanup and helps debug unclosed version handles. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
Log the calling file and line in EndpointPolicy.Detach if the policy was not marked as Ready at the time of the Detach call. This helps finding out where the problem may lie. Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
c45575c
to
f2be250
Compare
/test |
sayboras
approved these changes
Jan 13, 2025
christarazi
reviewed
Jan 14, 2025
christarazi
approved these changes
Jan 14, 2025
45 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects/v1.14
This issue affects v1.14 branch
affects/v1.15
This issue affects v1.15 branch
affects/v1.16
This issue affects v1.16 branch
area/proxy
Impacts proxy components, including DNS, Kafka, Envoy and/or XDS servers.
backport-done/1.17
The backport for Cilium 1.17.x for this PR is done.
kind/bug
This is a bug in the Cilium logic.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-blocker/1.17
This issue will prevent the release of the next version of Cilium.
release-note/misc
This PR makes changes that have no direct user impact.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Start serving xDS resources to Envoy as soon as policies for all restored endpoints have been computed, rather than waiting for them to be fully restored.