diff --git a/pkg/cloudprovider/providers/azure/azure_standard.go b/pkg/cloudprovider/providers/azure/azure_standard.go index 7a42ab52cd6..0ebcff0210a 100644 --- a/pkg/cloudprovider/providers/azure/azure_standard.go +++ b/pkg/cloudprovider/providers/azure/azure_standard.go @@ -221,6 +221,10 @@ func getPrimaryInterfaceID(machine compute.VirtualMachine) (string, error) { } func getPrimaryIPConfig(nic network.Interface) (*network.InterfaceIPConfiguration, error) { + if nic.IPConfigurations == nil { + return nil, fmt.Errorf("nic.IPConfigurations for nic (nicname=%q) is nil", *nic.Name) + } + if len(*nic.IPConfigurations) == 1 { return &((*nic.IPConfigurations)[0]), nil } @@ -231,7 +235,7 @@ func getPrimaryIPConfig(nic network.Interface) (*network.InterfaceIPConfiguratio } } - return nil, fmt.Errorf("failed to determine the determine primary ipconfig. nicname=%q", *nic.Name) + return nil, fmt.Errorf("failed to determine the primary ipconfig. nicname=%q", *nic.Name) } func isInternalLoadBalancer(lb *network.LoadBalancer) bool { diff --git a/pkg/cloudprovider/providers/azure/azure_vmss.go b/pkg/cloudprovider/providers/azure/azure_vmss.go index 508f8f91fc5..e24680fe685 100644 --- a/pkg/cloudprovider/providers/azure/azure_vmss.go +++ b/pkg/cloudprovider/providers/azure/azure_vmss.go @@ -785,11 +785,11 @@ func (ss *scaleSet) EnsureHostsInPool(serviceName string, nodes []*v1.Node, back for _, curNode := range nodes { curScaleSetName, err := extractScaleSetNameByVMID(curNode.Spec.ExternalID) if err != nil { - glog.V(2).Infof("Node %q is not belonging to any scale sets, omitting it", curNode.Name) + glog.V(4).Infof("Node %q is not belonging to any scale sets, omitting it", curNode.Name) continue } if curScaleSetName != vmSetName { - glog.V(2).Infof("Node %q is not belonging to scale set %q, omitting it", curNode.Name, vmSetName) + glog.V(4).Infof("Node %q is not belonging to scale set %q, omitting it", curNode.Name, vmSetName) continue }