mirror of https://github.com/k3s-io/k3s
skip nic that are in failing state
parent
ec37c0f643
commit
957b6be80d
|
@ -52,7 +52,8 @@ const (
|
|||
InternalLoadBalancerNameSuffix = "-internal"
|
||||
|
||||
// nodeLabelRole specifies the role of a node
|
||||
nodeLabelRole = "kubernetes.io/role"
|
||||
nodeLabelRole = "kubernetes.io/role"
|
||||
nicFailedState = "Failed"
|
||||
|
||||
storageAccountNameMaxLength = 24
|
||||
)
|
||||
|
@ -619,6 +620,11 @@ func (as *availabilitySet) ensureHostInPool(serviceName string, nodeName types.N
|
|||
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
|
||||
primaryIPConfig, err = getPrimaryIPConfig(nic)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue