Merge "Add permanent ARP entries for DVR fip/qrouter veth pair"
This commit is contained in:
commit
70d207d2fb
@ -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)
|
||||
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user