do not return error on invalid mac address in vsphere cloud provider

parent f99728e6
...@@ -569,7 +569,8 @@ func getLocalIP() ([]v1.NodeAddress, error) { ...@@ -569,7 +569,8 @@ func getLocalIP() ([]v1.NodeAddress, error) {
vmMACAddr := strings.ToLower(i.HardwareAddr.String()) vmMACAddr := strings.ToLower(i.HardwareAddr.String())
// Making sure that the MAC address is long enough // Making sure that the MAC address is long enough
if len(vmMACAddr) < 17 { if len(vmMACAddr) < 17 {
return addrs, fmt.Errorf("MAC address %q is invalid", vmMACAddr) klog.V(4).Infof("Skipping invalid MAC address: %q", vmMACAddr)
continue
} }
if vmwareOUI[vmMACAddr[:8]] { if vmwareOUI[vmMACAddr[:8]] {
nodehelpers.AddToNodeAddresses(&addrs, nodehelpers.AddToNodeAddresses(&addrs,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment