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

ENI allocates/frees in loop with custom networking and WARM_ENI_TARGET=0 #1451

Open
jayanthvn opened this issue Apr 30, 2021 · 16 comments
Open
Labels
bug enhancement stale Issue or PR is stale

Comments

@jayanthvn
Copy link
Contributor

What happened:

If custom networking is enabled and WARM_ENI_TARGET = 0, nodes which have no pods including coreDNS behind the secondary ENI will continuously free and add the secondary ENI.

Attach logs

cat /var/log/aws-routed-eni/ipamd.log | grep "Created a new"
{"level":"info","ts":"2021-04-30T03:48:00.292Z","caller":"awsutils/awsutils.go:674","msg":"Created a new ENI: eni-00403d554ade0d048"}
{"level":"info","ts":"2021-04-30T05:25:14.616Z","caller":"awsutils/awsutils.go:674","msg":"Created a new ENI: eni-07fc36da573f67a17"}
{"level":"info","ts":"2021-04-30T05:29:24.806Z","caller":"awsutils/awsutils.go:674","msg":"Created a new ENI: eni-0059aeefc485ad649"}
{"level":"info","ts":"2021-04-30T05:33:35.817Z","caller":"awsutils/awsutils.go:674","msg":"Created a new ENI: eni-00adbdaf675289a01"}
{"level":"info","ts":"2021-04-30T05:37:45.499Z","caller":"awsutils/awsutils.go:674","msg":"Created a new ENI: eni-006765cc28a46d9d2"}
{"level":"info","ts":"2021-04-30T05:41:55.402Z","caller":"awsutils/awsutils.go:674","msg":"Created a new ENI: eni-0178184612cc5184d"}
[ec2-user@ip-192-168-23-109 ~]$ cat /var/log/aws-routed-eni/ipamd.log | grep "Successfully deleted"
{"level":"info","ts":"2021-04-30T05:25:09.195Z","caller":"retry/retry.go:70","msg":"Successfully deleted ENI: eni-00403d554ade0d048"}
{"level":"info","ts":"2021-04-30T05:29:19.357Z","caller":"retry/retry.go:70","msg":"Successfully deleted ENI: eni-07fc36da573f67a17"}
{"level":"info","ts":"2021-04-30T05:33:30.377Z","caller":"retry/retry.go:70","msg":"Successfully deleted ENI: eni-0059aeefc485ad649"}
{"level":"info","ts":"2021-04-30T05:37:40.043Z","caller":"retry/retry.go:70","msg":"Successfully deleted ENI: eni-00adbdaf675289a01"}
{"level":"info","ts":"2021-04-30T05:41:49.911Z","caller":"retry/retry.go:70","msg":"Successfully deleted ENI: eni-006765cc28a46d9d2"}
{"level":"info","ts":"2021-04-30T05:46:00.768Z","caller":"retry/retry.go:70","msg":"Successfully deleted ENI: eni-0178184612cc5184d"}

Issue is not seen without custom networking since the primary ENI is not freed.

What you expected to happen:
ENI should not be freed and one ENI should be reserved for custom networking scenarios.

How to reproduce it (as minimally and precisely as possible):
Have 2 nodes, enabled custom networking and set WARM_ENI_TARGET=0

Anything else we need to know?:
Better approach is to not rely on counters, walk through the ENIs and cache available ENI. Compare that with WARM_ENI_TARGET or if custom networking is enabled.

Environment:

  • Kubernetes version (use kubectl version):
  • CNI Version -> Day 1 issue
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the stale Issue or PR is stale label Apr 14, 2022
@jayanthvn
Copy link
Contributor Author

PR is pending review. /not stale

@github-actions github-actions bot removed the stale Issue or PR is stale label Apr 19, 2022
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added stale Issue or PR is stale and removed stale Issue or PR is stale labels Jun 18, 2022
@jayanthvn
Copy link
Contributor Author

/not stale

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the stale Issue or PR is stale label Sep 21, 2022
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

Issue closed due to inactivity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2022
@jdn5126 jdn5126 removed the stale Issue or PR is stale label Apr 24, 2023
@jdn5126 jdn5126 reopened this Apr 24, 2023
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the stale Issue or PR is stale label Jun 24, 2023
@jdn5126 jdn5126 removed the stale Issue or PR is stale label Jun 26, 2023
@jdn5126
Copy link
Contributor

jdn5126 commented Jun 26, 2023

The current plan for addressing the scenario where WARM_ENI_TARGET=0 and all ENIs are full is to enhance the CNI/IPAMD interface to attach ENIs on demand. The current recommendation is to NOT use WARM_ENI_TARGET=0, but to instead set WARM_IP_TARGET=1 and a MAX_ENI value for your instance.

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the stale Issue or PR is stale label Aug 26, 2023
@jdn5126
Copy link
Contributor

jdn5126 commented Aug 28, 2023

/not stale

@jdn5126 jdn5126 removed the stale Issue or PR is stale label Aug 28, 2023
@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the stale Issue or PR is stale label Oct 28, 2023
@jdn5126 jdn5126 removed the stale Issue or PR is stale label Oct 30, 2023
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the stale Issue or PR is stale label Dec 30, 2023
@jdn5126 jdn5126 removed the stale Issue or PR is stale label Jan 2, 2024
Copy link

github-actions bot commented Mar 3, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the stale Issue or PR is stale label Mar 3, 2024
@jdn5126 jdn5126 removed the stale Issue or PR is stale label Mar 4, 2024
Copy link

github-actions bot commented May 4, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the stale Issue or PR is stale label May 4, 2024
Copy link

Issue closed due to inactivity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2024
@orsenthil orsenthil reopened this May 18, 2024
@github-actions github-actions bot removed the stale Issue or PR is stale label Jul 26, 2024
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days

@github-actions github-actions bot added the stale Issue or PR is stale label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement stale Issue or PR is stale
Projects
None yet
Development

No branches or pull requests

4 participants