-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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 MAC filtering in vSphere cloud provider #73721
Fix MAC filtering in vSphere cloud provider #73721
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: frapposelli 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 |
this fix should be backported as well. |
Official list of OUIs: http://standards-oui.ieee.org/oui.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that a MAC can be manually set with an OUI other than VMware's.
Another option to consider is using the vSphere API instead of net.Interfaces
, this method only returns IP address that have a corresponding vSphere virtual NIC device:
Though I suppose this isn't an option for in-tree, since nodes don't require vSphere credentials. Maybe something for out-of-tree provider to consider?
@dougm AFAIK out-of-tree does not perform this check at all, exactly because MAC addresses can be completely arbitrary on the platform. Performing some form of reconciliation between the vSphere API and the local machine is a very good idea for out-of-tree. |
I've validated that, without larger code changes, MAC-based OUI filtering is required. Using https://github.com/joshrosso/kubernetes/commit/5ef48f8d1de112ae56a77f6f20f61fafc9a49855, I built a kubelet image and the result is every interface's IP address was picked up. Including the docker bridge. After matching similar functionality to this PR via https://github.com/joshrosso/kubernetes/commit/8ecf6cd9b9f75985002de2d805239c8a8b4860c0 I was able to verify the IP was set correctly. As discussed above this is fragile as non-VMware OUIs could come through the system. Reconciliation against vCenter is highly preferred. However, I understand the constraints making that only plausible for the external provider. |
/retest |
/lgtm |
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/test pull-kubernetes-e2e-gce-100-performance |
/test pull-kubernetes-integration |
…73721-upstream-release-1.11 Automated cherry pick of #73721: fix mac filtering in vsphere cloud provider
…73721-upstream-release-1.13 Automated cherry pick of #73721: fix mac filtering in vsphere cloud provider
…73721-upstream-release-1.12 Automated cherry pick of #73721: fix mac filtering in vsphere cloud provider
vSphere cloud provider patches node ips only if they're from a mac address that is associated to the VMware OUI, the previous list was missing two allocated OUIs, this led to cloud provider not patching node ips correctly.
What type of PR is this?
/kind bug
/sig cloud-provider
/sig vmware
/assign @andrewsykim @SandeepPissay @dougm
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?: