mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
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 ```
This commit is contained in:
commit
36815869ad
@ -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
|
|||||||
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user