Skip to content

1.18 backports - #637

Merged
HadrienPatte merged 4 commits into
v1.18-ddfrom
hadrien/1.18/backports
Nov 20, 2025
Merged

1.18 backports#637
HadrienPatte merged 4 commits into
v1.18-ddfrom
hadrien/1.18/backports

Conversation

@HadrienPatte

Copy link
Copy Markdown
Member

Backport the following upstream PRs:

antonipp and others added 4 commits November 20, 2025 11:16
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>
@HadrienPatte
HadrienPatte requested a review from a team November 20, 2025 10:24
@HadrienPatte
HadrienPatte merged commit 03ba332 into v1.18-dd Nov 20, 2025
17 of 18 checks passed
@HadrienPatte
HadrienPatte deleted the hadrien/1.18/backports branch November 20, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants