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

Allow configuration of the leaked ENI reconciliation #2360

Closed
alanty opened this issue Apr 25, 2023 · 3 comments
Closed

Allow configuration of the leaked ENI reconciliation #2360

alanty opened this issue Apr 25, 2023 · 3 comments

Comments

@alanty
Copy link

alanty commented Apr 25, 2023

What would you like to be added:
As of v1.12.6 the CNI checks for "leaked" ENIs every hour:
https://github.com/aws/amazon-vpc-cni-k8s/blob/v1.12.6/pkg/awsutils/awsutils.go#L440

	// Clean up leaked ENIs in the background
	if !disableENIProvisioning {
		go wait.Forever(cache.cleanUpLeakedENIs, time.Hour)
	}

rather than having the time.hour hardcoded could we parameterize that interval, or allow this process to only run once on node init?

Why is this needed:

This check eventually issues a DescribeNetworkInterfaces command to get all available ENIs that were allocated by the AWS CNI plugin, but were not deleted.
https://github.com/aws/amazon-vpc-cni-k8s/blob/v1.12.6/pkg/awsutils/awsutils.go#L1748

In accounts with a large number of nodes or network interfaces this can cause a large number of Describe calls. By controlling the reconciliation we can continue to allow the leaked ENIs to be cleaned up, but reduce the unnecessary Describe calls for large accounts.

@jayanthvn
Copy link
Contributor

jayanthvn commented Apr 25, 2023

@alanty - We are thinking about moving this to the control plane (VPC RC) hence planning to add this knob - #1641 but that would need some additional testing and release so in the mean time we can think of making it configurable or make it staggered. It will be still suboptimal even if it is called once since all nodes will make a call once and if there is a node churn then we won't get much of the benefit.

@jayanthvn jayanthvn added this to the v1.12.7 milestone Apr 29, 2023
@jayanthvn jayanthvn modified the milestones: v1.12.7, v1.13.0 May 6, 2023
@jdn5126
Copy link
Contributor

jdn5126 commented May 12, 2023

Closing as fixed by #2370

@jdn5126 jdn5126 closed this as completed May 12, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants