Skip to content

Commit

Permalink
Merge pull request #2195 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…2087-to-release-1.23

[release-1.23] Skip "instance not found" error for LB backend address pools
  • Loading branch information
k8s-ci-robot committed Sep 4, 2022
2 parents 33d4574 + 092364c commit 863d708
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/provider/azure_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package provider
import (
"context"
"encoding/json"
"errors"
"fmt"
"math"
"reflect"
Expand Down Expand Up @@ -97,7 +98,9 @@ func (az *Cloud) reconcileService(ctx context.Context, clusterName string, servi
lbStatus, fipConfig, err := az.getServiceLoadBalancerStatus(service, lb, nil)
if err != nil {
klog.Errorf("getServiceLoadBalancerStatus(%s) failed: %v", serviceName, err)
return nil, err
if !errors.Is(err, ErrorNotVmssInstance) {
return nil, err
}
}

var serviceIP *string
Expand Down
4 changes: 3 additions & 1 deletion pkg/provider/azure_vmss.go
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,9 @@ func (ss *ScaleSet) EnsureHostInPool(service *v1.Service, nodeName types.NodeNam
}

klog.Errorf("EnsureHostInPool: failed to get VMSS VM %s: %v", vmName, err)
return "", "", "", nil, err
if !errors.Is(err, ErrorNotVmssInstance) {
return "", "", "", nil, err
}
}

klog.V(2).Infof("ensuring node %q of scaleset %q in LB backendpool %q", nodeName, ssName, backendPoolID)
Expand Down

0 comments on commit 863d708

Please sign in to comment.