]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix for FIPs duplicated across hosts for DVR
authorMichael Smith <michael.smith6@hp.com>
Mon, 10 Nov 2014 23:49:14 +0000 (15:49 -0800)
committerMichael Smith <michael.smith6@hp.com>
Wed, 12 Nov 2014 17:22:59 +0000 (09:22 -0800)
commit0a21b909baa11e4655852c27ab282c32e0aa7a94
treeb7b8ae9b3aec3be0a6b32415eb676d7a2ed09dd6
parent49234a824c16164a56cbfbf644490d07bb22e241
Fix for FIPs duplicated across hosts for DVR

For DVR, FIPs should be hosted on the single node
which hosts the VM assigned with the fixed_ip of the FIP.
The l3_agent should only take action on the correct FIP per
host by filtering the FIPs based on the 'host' value
of the FIP.

A recent refactor on the l3_agent moved the host filtering logic
from process_router_floating_ip_addresses() to
_get_external_device_interface_name(). The local floating_ips var
was not altered as it was before the refactor.

This resulted in network disruption across multiple hosts
since more than one namespace contained the FIP.  This problem
would only be seen in a mutli-host environment where the same
router hosting FIPs was present on more than one node.

The fix is to return the host filtering logic by adding a
call to get_floating_ips().  In addition, the unit test
test_process_router_dist_floating_ip_add() was modified to
pass two FIPs instead of one.  One FIP matches the host
of the agent, one does not.  Only one should be processed,
not two.

Change-Id: I67b19f6228af392519fff89b13283b43921552bf
Closes-bug: #1389880
neutron/agent/l3_agent.py
neutron/tests/unit/test_l3_agent.py