Add parameters to limit the number of DHCP or L3 agents
At present the maximum number of DHCP or L3 agents per tenant network is governed by the total number of agents which exist in the deployment. When using L3 routed pods it may be necessary to deploy extra DHCP agents, but each of these only has access to a subset of the networks. This patch adds optional parameters 'neutron_l3_agents_max' and 'neutron_dhcp_agents_max' which allow the number of agents used per tenant network to be limited to match the deployment's requirements. Change-Id: I80e6206c54cf1876b5c6c273b948718d48d495ca
This commit is contained in:
parent
1d74aed5f4
commit
fb6284b257
@ -397,6 +397,9 @@ neutron_l3_ha_net_cidr: 169.254.192.0/18
|
||||
|
||||
neutron_l3_cleanup_on_shutdown: False
|
||||
|
||||
# Specify the maximum number of L3 agents per tenant network. Defaults to the total number of agents deployed
|
||||
# neutron_l3_agents_max: 2
|
||||
|
||||
###
|
||||
### DHCP Agent Plugin Configuration
|
||||
###
|
||||
@ -410,6 +413,9 @@ neutron_dnsmasq_lease_max: 16777216
|
||||
# Specify if dnsmasq should send a route to metadata server through DHCP 121 message to VM
|
||||
neutron_dnsmasq_force_metadata: False
|
||||
|
||||
# Specify the maximum number of DHCP agents per tenant network. Defaults to the total number of agents deployed
|
||||
# neutron_dhcp_agents_max: 2
|
||||
|
||||
###
|
||||
### Metadata Agent Plugin Configuration
|
||||
###
|
||||
|
@ -57,11 +57,11 @@ enable_dvr = {{ neutron_plugins[neutron_plugin_type].router_distributed | defaul
|
||||
# Agents
|
||||
agent_down_time = {{ neutron_agent_down_time }}
|
||||
|
||||
{% set num_agent = groups[neutron_services['neutron-dhcp-agent']['group']] | length %}
|
||||
{% if neutron_plugin_type.split('.')[0] == 'ml2' and num_agent >= 2 %}
|
||||
{% set num_l3_agent = (neutron_l3_agents_max | int) if neutron_l3_agents_max is defined else groups[neutron_services['neutron-l3-agent']['group']] | length %}
|
||||
{% if neutron_plugin_type.split('.')[0] == 'ml2' and num_l3_agent >= 2 %}
|
||||
{% if neutron_services['neutron-linuxbridge-agent']['service_en'] | bool or neutron_services['neutron-openvswitch-agent']['service_en'] | bool %}
|
||||
|
||||
{% set max_l3_router = num_agent if num_agent > 2 else 2 %}
|
||||
{% set max_l3_router = num_l3_agent if num_l3_agent > 2 else 2 %}
|
||||
|
||||
# L3HA
|
||||
l3_ha = True
|
||||
@ -83,7 +83,8 @@ bind_host = {{ neutron_api_bind_address }}
|
||||
api_workers = {{ neutron_api_workers | default(neutron_api_threads) }}
|
||||
rpc_workers = {{ neutron_rpc_workers }}
|
||||
|
||||
{% set dhcp_agents_max = num_agent if num_agent > 2 else 2 %}
|
||||
{% set num_dhcp_agent = (neutron_dhcp_agents_max | int) if neutron_dhcp_agents_max is defined else groups[neutron_services['neutron-dhcp-agent']['group']] | length %}
|
||||
{% set dhcp_agents_max = num_dhcp_agent if num_dhcp_agent > 2 else 2 %}
|
||||
# DHCP
|
||||
{% if neutron_plugin_type == 'vmware.nsx' %}
|
||||
dhcp_agent_notification = False
|
||||
|
Loading…
Reference in New Issue
Block a user