aws/amazon-vpc-cni-k8s

Issue with count of unmanaged ENIs

Geschlossen

#3.544 geöffnet am 11.12.2025

 (7 Kommentare) (2 Reaktionen) (1 zugewiesene Person)Go (823 Forks)auto 404
buggood first issue

Repository-Metriken

Stars
 (2.450 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 10T 13h) (29 gemergte PRs in 30 T)

Beschreibung

What happened:

  Warning  FailedCreatePodSandBox  2m6s (x62 over 15m)  kubelet            (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "f44b32fc51168ef2352e384a3d853da635c5fa0b469121f1aede7a924004b870": plugin type="aws-cni" name="aws-cni" failed (add): add cmd: failed to assign an IP address to container

This code notices unmanaged ENIs and increments the count, but never decrements it: https://github.com/aws/amazon-vpc-cni-k8s/blob/a2c18c1cb0ff32c36157b6dae4aacc5d5f243b3d/pkg/ipamd/ipamd.go#L2104

In our workflow we attach and detach unmanaged ENIs from our nodes for during some operations. Doing so can result in the aws-cni eventually failing to assign IPs to containers.

Attach logs

What you expected to happen: Detaching an unmanaged ENI should decrement the count.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
  • CNI Version
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):

Contributor Guide