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

Avoid detaching EFA ENIs #1237

Merged
merged 1 commit into from
Oct 1, 2020
Merged

Avoid detaching EFA ENIs #1237

merged 1 commit into from
Oct 1, 2020

Conversation

mogren
Copy link
Contributor

@mogren mogren commented Sep 30, 2020

What type of PR is this?
Enhancement

What does this PR do / Why do we need it:
If we have an instance with EFA interfaces, we should make sure to never detach them.

Testing done on this change:
Added unit tests

Automation added to e2e:
No new tests added. Passing e2e tests: https://app.circleci.com/pipelines/github/mogren/amazon-vpc-cni-k8s/1035/workflows/86d66e2b-d920-44a4-8c4c-10dd54aca78d/jobs/2082

Will this break upgrades or downgrades. Has updating a running cluster been tested?:
No

Does this change require updates to the CNI daemonset config files to work?:
No

Does this PR introduce any user-facing change?:
No

* Do not detach EFA interfaces.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mogren mogren added this to the v1.7.4 milestone Sep 30, 2020
@@ -1039,14 +1048,22 @@ func (cache *EC2InstanceMetadataCache) DescribeAllENIs() ([]ENIMetadata, map[str
if interfaceType == "trunk" {
trunkENI = eniID
}
if interfaceType == "efa" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we consider to use switch/case to evaluate interfaceTypes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we get a third custom interface type, I think it's about time to switch. 😀

pkg/ipamd/ipamd.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jayanthvn jayanthvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@mogren mogren merged commit 591c44b into aws:master Oct 1, 2020
@mogren mogren deleted the avoid-deleting-efa branch October 1, 2020 00:01
@mogren mogren modified the milestones: v1.7.4, v1.7.5 Oct 1, 2020
@jayanthvn jayanthvn modified the milestones: v1.7.5, v1.7.6 Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants