Ensure not found exception is ignored when LB is not present

When using ovn-octavia driver a load balancer can be deleted
fast enought to cause a NotFoundException when trying to retrieve
it, which is different than the current exception being handled.
This commit ensures the additional exception is handled.

Change-Id: I11edd23303a017b281ef3a9a4ff28ee8baeb08cd
Closes-bug: 1853498
This commit is contained in:
Maysa Macedo 2019-11-21 17:29:46 +00:00
parent 9c8cc8b092
commit 2449917831
1 changed files with 2 additions and 2 deletions

View File

@ -761,7 +761,7 @@ class LBaaSv2Driver(base.LBaaSDriver):
for remaining in self._provisioning_timer(timeout, interval):
try:
lbaas.get_load_balancer(loadbalancer.id)
except o_exc.ResourceNotFound:
except o_exc.NotFoundException:
return
def _provisioning_timer(self, timeout,
@ -808,7 +808,7 @@ class LBaaSv2Driver(base.LBaaSDriver):
lbaas = clients.get_loadbalancer_client()
try:
response = lbaas.get_load_balancer(lb_uuid)
except o_exc.ResourceNotFound:
except o_exc.NotFoundException:
LOG.debug("Couldn't find loadbalancer with uuid=%s", lb_uuid)
return None