Skip to content

Commit

Permalink
Merge pull request #240 from MaysaMacedo/skip-lb-sg-update
Browse files Browse the repository at this point in the history
Bug 1838985:Skip LB sg update when no endpoint is found
  • Loading branch information
openshift-merge-robot committed May 22, 2020
2 parents 6b87c53 + f01f5a9 commit f0938fb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kuryr_kubernetes/controller/drivers/lbaasv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,12 @@ def update_lbaas_sg(self, service, sgs):

endpoints_link = utils.get_endpoints_link(service)
k8s = clients.get_kubernetes_client()
endpoint = k8s.get(endpoints_link)
try:
endpoint = k8s.get(endpoints_link)
except k_exc.K8sResourceNotFound:
LOG.debug("Endpoint not Found. Skipping LB SG update for"
"%s as the LB resources are not present", lbaas_name)
return

lbaas = utils.get_lbaas_state(endpoint)
if not lbaas:
Expand Down

0 comments on commit f0938fb

Please sign in to comment.