Merge pull request #82264 from syseleven/openstack_dont_delete_lb_on_errors

openstack: Don't Delete LB in Case of Security Group Reconciliation Errors
This commit is contained in:
Kubernetes Prow Robot 2019-10-10 06:03:44 -07:00 committed by GitHub
commit 8ad7e78d37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -999,9 +999,7 @@ func (lbaas *LbaasV2) EnsureLoadBalancer(ctx context.Context, clusterName string
if lbaas.opts.ManageSecurityGroups {
err := lbaas.ensureSecurityGroup(clusterName, apiService, nodes, loadbalancer)
if err != nil {
// cleanup what was created so far
_ = lbaas.EnsureLoadBalancerDeleted(ctx, clusterName, apiService)
return status, err
return status, fmt.Errorf("Error reconciling security groups for LB service %v/%v: %v", apiService.Namespace, apiService.Name, err)
}
}