1.18 backports - #637
Merged
Merged
Conversation
Signed-off-by: Anton Ippolitov <anton.ippolitov@datadoghq.com>
Our operators sometimes crash with this panic:
```
panic: interface conversion: interface {} is nil, not *v1.Pod
goroutine 10559 [running]:
github.com/cilium/cilium/operator/watchers.nodeHasCiliumPod({0x4012992cc0?, 0x4012992cc0?})
/go/src/github.com/cilium/cilium/operator/watchers/node_taint.go:193 +0x1b0
github.com/cilium/cilium/operator/watchers.checkAndMarkNode({0x56665c0, 0x4003d35420}, {0x56c77e8, 0x400108f5f0}, {0x5619380, 0x8a82e40}, {0x4012992cc0?,
0x0?}, {0x1?, 0x95?, ...}, ...)
/go/src/github.com/cilium/cilium/operator/watchers/node_taint.go:123 +0x7c
github.com/cilium/cilium/operator/watchers.checkTaintForNextNodeItem({0x56c77e8, 0x400108f5f0}, {0x5619380, 0x8a82e40}, {0x568a9f0, 0x400313a600},
0x4000ac3ca0)
/go/src/github.com/cilium/cilium/operator/watchers/node_taint.go:76 +0xfc
github.com/cilium/cilium/operator/watchers.HandleNodeTolerationAndTaints.func1()
/go/src/github.com/cilium/cilium/operator/watchers/node_taint.go:503 +0xb4
created by github.com/cilium/cilium/operator/watchers.HandleNodeTolerationAndTaints in goroutine 10283
/go/src/github.com/cilium/cilium/operator/watchers/node_taint.go:498 +0xd0
```
This PR makes `nodeHasCiliumPod` more robust to prevent it from panicing
on unsafe type assertion. `nodeHasCiliumPod` previously assumed that all
objects from `ciliumPodsStore.ByIndex()` were ``*slim_corev1.Po`d, but
the store can actually contain:
* `*slim_corev1.Pod` objects
* `cache.DeletedFinalStateUnknown` objects (when pods are being deleted)
* Potentially nil interfaces in edge cases
Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
Check context cancellation before treating accept() errors as fatal during operator, daemon, and clustermesh-apiserver shutdown. This removes these error logs on pod shutdown: ``` one-shot job errored: accept failed: accept unix /var/run/cilium/shell.sock: use of closed network connection ``` Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
A bug was detected in AWS’s ENI attachment API. The validation of available ENI attachment slots fails on instances with multiple network cards when the network card index is not set explicitly. AWS is working on a fix that is expected to be released by January 30. In the meantime, this change resolves the issue on the Cilium side. Signed-off-by: Alex Melhem <alex.melhem@datadoghq.com>
antonipp
approved these changes
Nov 20, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport the following upstream PRs: