Unverified Commit 36815869 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #65412 from yastij/az-ignore-failed-nic

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. skip nic that are in failing state **What this PR does / why we need it**: this fixes partially #65025. Currently when getting primary NIC for VMSS the provisioning state isn't returned. **Which issue(s) this PR fixes** : Fixes partially (for VMAS) #65025 **Special notes for your reviewer**: /assign @feiskyer **Release note**: ```release-note skip nodes that have a primary NIC in a 'Failed' provisioningState ```
parents f2db955b 957b6be8
...@@ -52,7 +52,8 @@ const ( ...@@ -52,7 +52,8 @@ const (
InternalLoadBalancerNameSuffix = "-internal" InternalLoadBalancerNameSuffix = "-internal"
// nodeLabelRole specifies the role of a node // nodeLabelRole specifies the role of a node
nodeLabelRole = "kubernetes.io/role" nodeLabelRole = "kubernetes.io/role"
nicFailedState = "Failed"
storageAccountNameMaxLength = 24 storageAccountNameMaxLength = 24
) )
...@@ -619,6 +620,11 @@ func (as *availabilitySet) ensureHostInPool(serviceName string, nodeName types.N ...@@ -619,6 +620,11 @@ func (as *availabilitySet) ensureHostInPool(serviceName string, nodeName types.N
return err return err
} }
if nic.ProvisioningState != nil && *nic.ProvisioningState == nicFailedState {
glog.V(3).Infof("ensureHostInPool skips node %s because its primdary nic %s is in Failed state", nodeName, nic.Name)
return nil
}
var primaryIPConfig *network.InterfaceIPConfiguration var primaryIPConfig *network.InterfaceIPConfiguration
primaryIPConfig, err = getPrimaryIPConfig(nic) primaryIPConfig, err = getPrimaryIPConfig(nic)
if err != nil { if err != nil {
......
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