Skip to content
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

pkg/k8s: do not perform an early return on ipcache errors #28840

Merged
merged 1 commit into from Oct 30, 2023

Conversation

aanm
Copy link
Member

@aanm aanm commented Oct 27, 2023

Although ipcache might return an error, we should not perform an early
return in the event handling of the pod event because some other
components that are unrelated to ipcache might depend on this specific
event per perform correctly. Instead we will log the ipcache error and
let the execution of the method to continue.

The pod might, for example, be in a "Pending" state which has its
status IP addresses not set but might be able to change labels in the
meanwhile which Cilium should react upon those changes which are not
related with ipcache.

Improved event handling for pod events by removing an unnecessary early return, allowing unrelated components to execute correctly, while enhancing ipcache error logging.

@aanm aanm added release-note/bug This PR fixes an issue in a previous release of Cilium. affects/v1.11 This issue affects v1.11 branch affects/v1.12 This issue affects v1.12 branch affects/v1.13 This issue affects v1.13 branch affects/v1.14 This issue affects v1.14 branch needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Oct 27, 2023
@aanm aanm requested a review from joestringer October 27, 2023 15:11
@aanm aanm requested a review from a team as a code owner October 27, 2023 15:11
@aanm aanm requested a review from joamaki October 27, 2023 15:11
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.14.4 Oct 27, 2023
@aanm
Copy link
Member Author

aanm commented Oct 27, 2023

/test

pkg/k8s/watchers/pod.go Outdated Show resolved Hide resolved
@maintainer-s-little-helper maintainer-s-little-helper bot added ready-to-merge This PR has passed all tests and received consensus from code owners to merge. labels Oct 30, 2023
@aanm aanm force-pushed the pr/fix-ipcache-early-return-error branch 2 times, most recently from 3b0faf1 to 51e0594 Compare October 30, 2023 08:12
Although ipcache might return an error, we should not perform an early
return in the event handling of the pod event because some other
components that are unrelated to ipcache might depend on this specific
event per perform correctly. Instead we will log the ipcache error and
let the execution of the method to continue.

The pod might, for example, be in a "Pending" state which has its
status IP addresses not set but might be able to change labels in the
meanwhile which Cilium should react upon those changes which are not
related with ipcache.

Signed-off-by: André Martins <andre@cilium.io>
@aanm aanm force-pushed the pr/fix-ipcache-early-return-error branch from 51e0594 to a0777d1 Compare October 30, 2023 08:12
@aanm
Copy link
Member Author

aanm commented Oct 30, 2023

/test

@aanm aanm removed the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 30, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 30, 2023
@aanm aanm merged commit 5a0b88d into cilium:main Oct 30, 2023
61 of 62 checks passed
@jibi jibi mentioned this pull request Nov 7, 2023
15 tasks
@jibi jibi added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Nov 7, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport pending to v1.14 in 1.14.4 Nov 7, 2023
@github-actions github-actions bot added backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Nov 8, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed this from Backport pending to v1.14 in 1.14.4 Nov 8, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Backport done to v1.14 in 1.14.4 Nov 8, 2023
@aanm aanm deleted the pr/fix-ipcache-early-return-error branch November 8, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/v1.11 This issue affects v1.11 branch affects/v1.12 This issue affects v1.12 branch affects/v1.13 This issue affects v1.13 branch affects/v1.14 This issue affects v1.14 branch backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
No open projects
1.14.4
Backport done to v1.14
Development

Successfully merging this pull request may close these issues.

None yet

4 participants