Fix KeyError exception upon service/deployment deletion

When service/deployment being deleted KeyError exception is reported,
this patch solve this issue.

Closes-Bug: #1714204

Change-Id: I701416fd8666e8723847046e83f5dd12bc1e7370
This commit is contained in:
Yossi Boaron 2017-10-17 17:12:16 +03:00
parent 3de89337f7
commit cfdc991349
1 changed files with 2 additions and 1 deletions

View File

@ -305,7 +305,8 @@ class LoadBalancerHandler(k8s_base.ResourceEventHandler):
continue
except KeyError:
continue
if not pool_by_tgt_name:
continue
for subset_port in subset_ports:
target_port = subset_port['port']
if (target_ip, target_port) in current_targets: