Merge pull request #56344 from gmarek/gce-lb-fix-19

Automatic merge from submit-queue (batch tested with PRs 56344, 56473). 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>.

Fix panic in GCE loadbalancer library
This commit is contained in:
Kubernetes Submit Queue 2017-11-28 04:17:30 -08:00 committed by GitHub
commit 6851e6abde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -344,7 +344,10 @@ func (gce *GCECloud) ensureExternalLoadBalancerDeleted(clusterName, clusterID st
glog.Infof("ensureExternalLoadBalancerDeleted(%s): Failed to retrieve health check:%v.", lbRefStr, err)
return err
}
// If we got 'StatusNotFound' LB was already deleted and it's safe to ignore.
if err == nil {
hcNames = append(hcNames, hcToDelete.Name)
}
} else {
// EnsureLoadBalancerDeleted() could be triggered by changing service from
// LoadBalancer type to others. In this case we have no idea whether it was