Skip to content

Commit

Permalink
Agent manager raises KeyError exception during load balancer sync (#1233
Browse files Browse the repository at this point in the history
)

Issues:
Fixes #1228

Problem: Agent manger raises KeyError exception when it deletes
a LB ID that is no longer in collection of pending services.

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

Tests: Tempest tests
  • Loading branch information
jlongstaf authored and richbrowne committed Jan 20, 2018
1 parent 54498e4 commit 1cfba10
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 e:
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 1cfba10

Please sign in to comment.