]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
l3_agent: make process_router more robust
authorJian Wen <jian.wen@canonical.com>
Wed, 27 Nov 2013 14:23:26 +0000 (22:23 +0800)
committerJian Wen <jian.wen@canonical.com>
Fri, 29 Nov 2013 03:11:43 +0000 (11:11 +0800)
commitdd71021347f782608575d551f2329715c00546ce
tree8393d5b0c47dfed4778a8e8cb2e49b7874f74d76
parent771f4faeb6720955d02ba5f800db974dbb9d6cab
l3_agent: make process_router more robust

If internal_network_added/removed fails, _sync_routers_task will call
process_router to do fault recovery. Because the port is already
added/removed to/from ri.internal_ports, internal_network_added or
internal_network_removed will not be called again.

The patch fix this issue by calling ri.internal_ports.append/removed
only if internal_network_added/removed succeed. Without the patch,
the added testcases would fail.

Change-Id: I2d2e004caa670c1624257c1d7ccc900438b42d08
Co-Authored-By: Hirofumi Ichihara <ichihara.hirofumi@lab.ntt.co.jp>
Closes-Bug: #1255871
neutron/agent/l3_agent.py
neutron/tests/unit/test_l3_agent.py