From c91eb1f179f04e84b0ae128f3acb2c3991d56068 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 24 Aug 2022 11:51:15 +0900 Subject: [PATCH] Use NeutronInterfaceDriver parameter consistently Currently the NeutronInterfaceDriver parameter is only partially used and the parameter is sometimes ignored because of the hieradata defined in individual templates. This is quite confusing and causes unexpected results. This change ensures the parameter is consistently used to manage the interface_driver parameter of dhcp agent and l3 agent. Change-Id: I9955a8493bb031674a9d99087bd83b009011a0a2 --- .../neutron-agents-ib-config-container-puppet.yaml | 6 +++++- deployment/neutron/neutron-l3-container-puppet.yaml | 9 +++++++-- .../neutron-linuxbridge-agent-baremetal-puppet.yaml | 1 - environments/neutron-linuxbridge.yaml | 1 + environments/neutron-ml2-vpp.yaml | 5 +---- environments/services/neutron-mlnx-agent.yaml | 1 + 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/deployment/neutron/neutron-agents-ib-config-container-puppet.yaml b/deployment/neutron/neutron-agents-ib-config-container-puppet.yaml index 82242e6292..0546596906 100644 --- a/deployment/neutron/neutron-agents-ib-config-container-puppet.yaml +++ b/deployment/neutron/neutron-agents-ib-config-container-puppet.yaml @@ -32,6 +32,10 @@ parameters: description: Mapping of service endpoint -> protocol. Typically set via parameter_defaults in the resource registry. type: json + NeutronInterfaceDriver: + default: 'neutron.agent.linux.interface.OVSInterfaceDriver' + description: Neutron DHCP Agent interface driver + type: string MultiInterfaceDriverMappings: type: comma_delimited_list default: "" @@ -84,7 +88,7 @@ outputs: neutron::agents::ml2::mlnx::manage_service: False neutron::agents::ml2::mlnx::manage_package: False neutron::agents::ml2::mlnx::dhcp_broadcast_reply: true - neutron::agents::ml2::mlnx::interface_driver : 'multi' + neutron::agents::ml2::mlnx::interface_driver: {get_param: NeutronInterfaceDriver} neutron::agents::ml2::mlnx::enable_multi_interface_driver_cache_maintenance : true puppet_config: config_volume: 'neutron' diff --git a/deployment/neutron/neutron-l3-container-puppet.yaml b/deployment/neutron/neutron-l3-container-puppet.yaml index a1a832b2b8..f31cd2fefb 100644 --- a/deployment/neutron/neutron-l3-container-puppet.yaml +++ b/deployment/neutron/neutron-l3-container-puppet.yaml @@ -139,6 +139,10 @@ parameters: description: | Output logfile path on agent side, default syslog file type: string + NeutronInterfaceDriver: + default: 'neutron.agent.linux.interface.OVSInterfaceDriver' + description: Neutron DHCP Agent interface driver + type: string conditions: az_set: @@ -230,8 +234,9 @@ outputs: - l3_agent_extensions_set - neutron::agents::l3::extensions: {get_param: NeutronL3AgentExtensions} - neutron::agents::l3::radvd_user: {get_param: NeutronL3AgentRadvdUser} - - neutron::agents::l3::network_log_rate_limit: {get_param: NeutronL3AgentLoggingRateLimit} - - neutron::agents::l3::network_log_burst_limit: {get_param: NeutronL3AgentLoggingBurstLimit} + neutron::agents::l3::network_log_rate_limit: {get_param: NeutronL3AgentLoggingRateLimit} + neutron::agents::l3::network_log_burst_limit: {get_param: NeutronL3AgentLoggingBurstLimit} + neutron::agents::l3::interface_driver: {get_param: NeutronInterfaceDriver} - if: - network_log_local_output_log_base_set - neutron::agents::l3::network_log_local_output_log_base: {get_param: NeutronL3AgentLoggingLocalOutputLogBase} diff --git a/deployment/neutron/neutron-linuxbridge-agent-baremetal-puppet.yaml b/deployment/neutron/neutron-linuxbridge-agent-baremetal-puppet.yaml index 7c826d9fb3..51ec0a21cd 100644 --- a/deployment/neutron/neutron-linuxbridge-agent-baremetal-puppet.yaml +++ b/deployment/neutron/neutron-linuxbridge-agent-baremetal-puppet.yaml @@ -78,7 +78,6 @@ outputs: "%{lookup('$NETWORK')}" params: $NETWORK: {get_param: [ServiceNetMap, NeutronTenantNetwork]} - neutron::agents::dhcp::interface_driver: 'neutron.agent.linux.interface.BridgeInterfaceDriver' neutron::agents::dhcp::dhcp_driver: 'neutron.agent.linux.dhcp.Dnsmasq' - if: - firewall_driver_set diff --git a/environments/neutron-linuxbridge.yaml b/environments/neutron-linuxbridge.yaml index 69c44512b1..be94081661 100644 --- a/environments/neutron-linuxbridge.yaml +++ b/environments/neutron-linuxbridge.yaml @@ -6,3 +6,4 @@ resource_registry: parameter_defaults: NeutronMechanismDrivers: ['linuxbridge'] + NeutronInterfaceDriver: 'neutron.agent.linux.interface.BridgeInterfaceDriver' diff --git a/environments/neutron-ml2-vpp.yaml b/environments/neutron-ml2-vpp.yaml index fad7b89631..ddd05b83bd 100644 --- a/environments/neutron-ml2-vpp.yaml +++ b/environments/neutron-ml2-vpp.yaml @@ -17,7 +17,4 @@ parameter_defaults: NeutronNetworkType: vlan NeutronServicePlugins: router NeutronTypeDrivers: vlan,flat - ExtraConfig: - # Use Linux Bridge driver for DHCP and L3 agent. - neutron::agents::dhcp::interface_driver: "neutron.agent.linux.interface.BridgeInterfaceDriver" - neutron::agents::l3::interface_driver: "neutron.agent.linux.interface.BridgeInterfaceDriver" + NeutronInterfaceDriver: 'neutron.agent.linux.interface.BridgeInterfaceDriver' diff --git a/environments/services/neutron-mlnx-agent.yaml b/environments/services/neutron-mlnx-agent.yaml index ea7975b9c2..246636bdd9 100644 --- a/environments/services/neutron-mlnx-agent.yaml +++ b/environments/services/neutron-mlnx-agent.yaml @@ -8,6 +8,7 @@ parameter_defaults: NeutronMechanismDrivers: ['mlnx_sdn_assist','mlnx_infiniband'] NeutronPluginExtensions: "qos,port_security" NeutronPhysicalDevMappings: ['datacentre:ib0'] + NeutronInterfaceDriver: 'multi' NovaSchedulerEnabledFilters: - ComputeFilter - ComputeCapabilitiesFilter