diff --git a/neutron/agent/l3/dvr_fip_ns.py b/neutron/agent/l3/dvr_fip_ns.py index 17e47cfa1a4..ce6f76762a6 100644 --- a/neutron/agent/l3/dvr_fip_ns.py +++ b/neutron/agent/l3/dvr_fip_ns.py @@ -448,6 +448,13 @@ class FipNamespace(namespaces.Namespace): self._add_cidr_to_device(rtr_2_fip_dev, str(rtr_2_fip)) self._add_cidr_to_device(fip_2_rtr_dev, str(fip_2_rtr)) + + # Add permanant ARP entries on each side of veth pair + rtr_2_fip_dev.neigh.add(common_utils.cidr_to_ip(fip_2_rtr), + fip_2_rtr_dev.link.address) + fip_2_rtr_dev.neigh.add(common_utils.cidr_to_ip(rtr_2_fip), + rtr_2_fip_dev.link.address) + self._add_rtr_ext_route_rule_to_route_table(ri, fip_2_rtr, fip_2_rtr_name) diff --git a/neutron/tests/unit/agent/l3/test_dvr_fip_ns.py b/neutron/tests/unit/agent/l3/test_dvr_fip_ns.py index c316c704b8a..89e19a45a88 100644 --- a/neutron/tests/unit/agent/l3/test_dvr_fip_ns.py +++ b/neutron/tests/unit/agent/l3/test_dvr_fip_ns.py @@ -25,6 +25,7 @@ from neutron.agent.l3 import router_info from neutron.agent.linux import ip_lib from neutron.agent.linux import iptables_manager from neutron.common import exceptions as n_exc +from neutron.common import utils as n_utils from neutron.tests import base _uuid = uuidutils.generate_uuid @@ -301,6 +302,11 @@ class TestDvrFipNs(base.BaseTestCase): device.addr.add.assert_has_calls(expected) self.assertEqual(2, device.addr.add.call_count) + expected = [mock.call(n_utils.cidr_to_ip(addr_pair[1]), mock.ANY), + mock.call(n_utils.cidr_to_ip(addr_pair[0]), mock.ANY)] + device.neigh.add.assert_has_calls(expected) + self.assertEqual(2, device.neigh.add.call_count) + device.route.add_gateway.assert_called_once_with( '169.254.31.29', table=16) self.assertTrue(