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

Fix testing if an interface is the loopback #74082

Merged
merged 1 commit into from Feb 16, 2019
Merged

Fix testing if an interface is the loopback #74082

merged 1 commit into from Feb 16, 2019

Conversation

benmoss
Copy link
Member

@benmoss benmoss commented Feb 14, 2019

What type of PR is this?

/kind bug

What this PR does / why we need it:
#73721 introduced a change that causes an error to occur when a non-loopback interface is found that doesn't have a valid MAC address. The problem is that the method for determining whether the interface is loopback or not is flawed: interfaces can have multiple IP addresses, and in our case our loopback interface has a 169 address assigned to as well as the 127 one.

Which issue(s) this PR fixes:
Special notes for your reviewer:

Does this PR introduce a user-facing change?:
If we can make it into the same release as #73721 we shouldn't need to amend the release notes

NONE

/sig cloud-provider
/sig vmware

cc @astrieanna

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. area/provider/vmware Issues or PRs related to vmware provider needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 14, 2019
@benmoss
Copy link
Member Author

benmoss commented Feb 14, 2019

We'll need to backport this to the same releases as #73721

@benmoss
Copy link
Member Author

benmoss commented Feb 14, 2019

/assign @frapposelli

@frapposelli
Copy link
Member

hi @benmoss, is this a regression introduced with #73721 or is it a net new bug? that specific check was not touched by the MAC filtering fix.

@astrieanna
Copy link
Contributor

@frapposelli With the same loopback setup, before that PR, our linux nodes were working correctly. With the PR and without this fix, they fail to register correctly (they don't show an IP address).

While the PR did not edit the loopback check on the IP, it did change the way the mac addresses are checked. Before, any non-matching mac address (including an empty one) was just ignored. Now, an empty mac address produces an error.

@frapposelli
Copy link
Member

@astrieanna thanks for the feedback, looks like the problem is caused by the ineffective check that this PR is fixing and by the forced return if MAC address is not long enough.

@astrieanna
Copy link
Contributor

/retest

It's not guaranteed that the loopback interface only has the loopback
IP, in our environments our loopback interface is also assigned a 169
address as well.
@divyenpatel
Copy link
Member

/assign @divyenpatel

@divyenpatel
Copy link
Member

/approve

@divyenpatel
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 15, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benmoss, divyenpatel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 15, 2019
@divyenpatel
Copy link
Member

/test pull-kubernetes-e2e-gce

@k8s-ci-robot k8s-ci-robot merged commit e691e5f into kubernetes:master Feb 16, 2019
@frapposelli
Copy link
Member

@andrewsykim can you backport this to 1.11/1.12/1.13 like the other MAC address patch? They go hand in hand

@benmoss benmoss deleted the loopback_check branch February 16, 2019 19:21
k8s-ci-robot added a commit that referenced this pull request Feb 18, 2019
…2-upstream-release-1.12

Automated cherry pick of #74082: Fix testing if an interface is the loopback
k8s-ci-robot added a commit that referenced this pull request Feb 18, 2019
…2-upstream-release-1.11

Automated cherry pick of #74082: Fix testing if an interface is the loopback
k8s-ci-robot added a commit that referenced this pull request Feb 21, 2019
…2-upstream-release-1.13

Automated cherry pick of #74082: Fix testing if an interface is the loopback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/vmware Issues or PRs related to vmware provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants