Skip to content

Commit

Permalink
Agent manager raises KeyError exception during load balancer sync
Browse files Browse the repository at this point in the history
Issues:
Fixes F5Networks#1228

Problem: Agent manager can raise KeyError exception when syncing
pending load balancers.

Analysis: Added try/except block to catch KeyError exception and
log and error.

Tests: Tempest API tests.
  • Loading branch information
jlongstaf committed Jan 19, 2018
1 parent 9d83bba commit 707555a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion f5_openstack_agent/lbaasv2/drivers/bigip/agent_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,11 @@ def _refresh_pending_services(self):
self.service_timeout(lb_id)

if not lb_pending:
del self.pending_services[lb_id]
try:
del self.pending_services[lb_id]
except KeyError as error:
LOG.error("LB not found in pending services: {0}".
format(e.message))

# If there are services in the pending cache resync
if self.pending_services:
Expand Down

0 comments on commit 707555a

Please sign in to comment.