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

Make sure we have space for a trunk ENI #1210

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

mogren
Copy link
Contributor

@mogren mogren commented Sep 13, 2020

What type of PR is this?
Bug fix

Which issue does this PR fix:
#1202

What does this PR do / Why do we need it:
We should only set the vpc.amazonaws.com/has-trunk-attached label on the node if there is space to attach one more ENI.

Testing done on this change:
Manual test in a cluster with MAX_ENI=1:

{"level":"debug","ts":"2020-09-13T00:13:38.120Z","caller":"ipamd/ipamd.go:481","msg":"No slot available for a trunk ENI to be attached. Not labeling the node"}
{"level":"debug","ts":"2020-09-13T00:13:40.620Z","caller":"ipamd/ipamd.go:476","msg":"Reconciling ENI/IP pool info because time since last 2562047h47m16.854775807s <= 1m0s"}
{"level":"debug","ts":"2020-09-13T00:13:40.621Z","caller":"ipamd/ipamd.go:912","msg":"Total number of interfaces found: 1 "}

After removing the MAX_ENI setting, the label gets applied, and a trunk ENI attached:

{"level":"info","ts":"2020-09-13T00:15:29.736Z","caller":"ipamd/ipamd.go:836","msg":"Updated node ip-192-168-198-30.us-west-2.compute.internal with label \"vpc.amazonaws.com/has-trunk-attached\": \"false\""}
{"level":"debug","ts":"2020-09-13T00:15:32.240Z","caller":"ipamd/ipamd.go:836","msg":"Node label \"vpc.amazonaws.com/has-trunk-attached\" is already \"false\""}
{"level":"info","ts":"2020-09-13T00:15:34.862Z","caller":"ipamd/ipamd.go:946","msg":"Updated node ip-192-168-198-30.us-west-2.compute.internal with label \"vpc.amazonaws.com/has-trunk-attached\": \"true\""}

Automation added to e2e:
None. Standard e2e tests pass: https://app.circleci.com/pipelines/github/mogren/amazon-vpc-cni-k8s/963/workflows/34c4ef50-c137-4ea8-a1b1-039964bf7cd0/jobs/1950

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

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

@mogren mogren merged commit 4ad1700 into aws:master Sep 17, 2020
@mogren mogren deleted the wait-for-trunk-space branch September 17, 2020 19:49
@mogren mogren added this to the v1.7.4 milestone Sep 23, 2020
@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
jayanthvn pushed a commit to jayanthvn/amazon-vpc-cni-k8s that referenced this pull request Nov 25, 2020
jayanthvn pushed a commit that referenced this pull request Nov 25, 2020
jayanthvn added a commit that referenced this pull request Nov 30, 2020
* Cherry-pick #1210

* Cherry-pick missed README line

Co-authored-by: Claes Mogren <mogren@amazon.com>
haouc pushed a commit to haouc/amazon-vpc-cni-k8s that referenced this pull request Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants