Skip to content

Issue with count of unmanaged ENIs #3544

@jtszalay

Description

@jtszalay

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:

c.unmanagedENI[eni.NetworkCard] += 1

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):

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions