]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
lb-agent: ensure removed devices get treated on resyncs
authorDarragh O'Reilly <dara2002-openstack@yahoo.com>
Mon, 3 Mar 2014 17:21:04 +0000 (17:21 +0000)
committerDarragh O'Reilly <dara2002-openstack@yahoo.com>
Mon, 30 Jun 2014 06:32:17 +0000 (06:32 +0000)
commit6bf67e0a576bd573042742f9b4bfc464d544c837
tree2bf6a137b46d4d5ee9fa25e2c7ed2ea89497e9d6
parentfe57b966ac4b2bf8e19b66ac75e25981361d5e0c
lb-agent: ensure removed devices get treated on resyncs

The previous exception handling in daemon_loop reprocessed all existing
devices as if they were new devices. However, it did not ensure that
any removed devices got cleaned up properly. This could result in
leftover security group iptables rules from deleted instances.

This patch refactors daemon_loop and scan_devices so devices that were
flagged for cleaning will get retreated in the next iteration if there
is an exception.

Change-Id: Ieada34ad315c0c29aa8462ebf041a448fde007b8
Closes-Bug: 1145610
neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py
neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py