DVR: Ignore DHCP port during DVR host query
For large scale deployment, the dvr router will be installed to the scheduled DHCP host. This will definitely increase the l3 agent service pressure, especially in large number of concurrent updates, creation, or agent restart. This patch adds a config ``host_dvr_for_dhcp`` for the DHCP port device_owner filter during DVR host query. Then if we set ``host_dvr_for_dhcp = False``, L3-agent will not host the DVR router namespace in its connected networks' DHCP agent hosts. Closes-Bug: #1609217 Change-Id: I53e20be9b306bf9d3b34ec6a31e3afabd5a0fd6f
This commit is contained in:
@@ -170,16 +170,18 @@ class exception_logger(object):
|
||||
return call
|
||||
|
||||
|
||||
def get_other_dvr_serviced_device_owners():
|
||||
def get_other_dvr_serviced_device_owners(host_dvr_for_dhcp=True):
|
||||
"""Return device_owner names for ports that should be serviced by DVR
|
||||
|
||||
This doesn't return DEVICE_OWNER_COMPUTE_PREFIX since it is a
|
||||
prefix, not a complete device_owner name, so should be handled
|
||||
separately (see is_dvr_serviced() below)
|
||||
"""
|
||||
return [n_const.DEVICE_OWNER_LOADBALANCER,
|
||||
n_const.DEVICE_OWNER_LOADBALANCERV2,
|
||||
n_const.DEVICE_OWNER_DHCP]
|
||||
device_owners = [n_const.DEVICE_OWNER_LOADBALANCER,
|
||||
n_const.DEVICE_OWNER_LOADBALANCERV2]
|
||||
if host_dvr_for_dhcp:
|
||||
device_owners.append(n_const.DEVICE_OWNER_DHCP)
|
||||
return device_owners
|
||||
|
||||
|
||||
def get_dvr_allowed_address_pair_device_owners():
|
||||
|
||||
Reference in New Issue
Block a user