Merge "Prevent LBaaS VRRP ports from populating DVR router ARP table"
This commit is contained in:
commit
c021ba6e39
@ -274,9 +274,12 @@ class DvrLocalRouter(dvr_router_base.DvrRouterBase):
|
|||||||
# TODO(Carl) Can we eliminate the need to make this RPC while
|
# TODO(Carl) Can we eliminate the need to make this RPC while
|
||||||
# processing a router.
|
# processing a router.
|
||||||
subnet_ports = self.agent.get_ports_by_subnet(subnet_id)
|
subnet_ports = self.agent.get_ports_by_subnet(subnet_id)
|
||||||
|
ignored_device_owners = (
|
||||||
|
lib_constants.ROUTER_INTERFACE_OWNERS +
|
||||||
|
tuple(common_utils.get_dvr_allowed_address_pair_device_owners()))
|
||||||
|
|
||||||
for p in subnet_ports:
|
for p in subnet_ports:
|
||||||
if p['device_owner'] not in lib_constants.ROUTER_INTERFACE_OWNERS:
|
if p['device_owner'] not in ignored_device_owners:
|
||||||
for fixed_ip in p['fixed_ips']:
|
for fixed_ip in p['fixed_ips']:
|
||||||
self._update_arp_entry(fixed_ip['ip_address'],
|
self._update_arp_entry(fixed_ip['ip_address'],
|
||||||
p['mac_address'],
|
p['mac_address'],
|
||||||
|
@ -496,6 +496,17 @@ class TestDvrRouterOperations(base.BaseTestCase):
|
|||||||
test_ports = [{'mac_address': '00:11:22:33:44:55',
|
test_ports = [{'mac_address': '00:11:22:33:44:55',
|
||||||
'device_owner': lib_constants.DEVICE_OWNER_DHCP,
|
'device_owner': lib_constants.DEVICE_OWNER_DHCP,
|
||||||
'fixed_ips': [{'ip_address': '1.2.3.4',
|
'fixed_ips': [{'ip_address': '1.2.3.4',
|
||||||
|
'prefixlen': 24,
|
||||||
|
'subnet_id': subnet_id}]},
|
||||||
|
{'mac_address': '11:22:33:44:55:66',
|
||||||
|
'device_owner': lib_constants.DEVICE_OWNER_LOADBALANCER,
|
||||||
|
'fixed_ips': [{'ip_address': '1.2.3.5',
|
||||||
|
'prefixlen': 24,
|
||||||
|
'subnet_id': subnet_id}]},
|
||||||
|
{'mac_address': '22:33:44:55:66:77',
|
||||||
|
'device_owner':
|
||||||
|
lib_constants.DEVICE_OWNER_LOADBALANCERV2,
|
||||||
|
'fixed_ips': [{'ip_address': '1.2.3.6',
|
||||||
'prefixlen': 24,
|
'prefixlen': 24,
|
||||||
'subnet_id': subnet_id}]}]
|
'subnet_id': subnet_id}]}]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user