From 9aa343f754e4f2837bc78027a39f1a7877b970d0 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 7 Jul 2022 22:17:36 +0900 Subject: [PATCH] Deprecate support for linuxbridge mechanism driver ... and disables it by default. The neutron team decided to make it experimental[1] and now the plugin is not loaded unless the user explicitly enables the experimental flag. [1] https://review.opendev.org/845181 Change-Id: If1ea40d783ac852865f6de00ddb2a1da090ca846 --- manifests/agents/ml2/linuxbridge.pp | 3 +++ manifests/config.pp | 19 +++++++++++++------ manifests/plugins/ml2.pp | 4 ++-- ...eprecate-linuxbridge-c70a64f210cca859.yaml | 10 ++++++++++ spec/classes/neutron_plugins_ml2_spec.rb | 2 +- 5 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/deprecate-linuxbridge-c70a64f210cca859.yaml diff --git a/manifests/agents/ml2/linuxbridge.pp b/manifests/agents/ml2/linuxbridge.pp index 636822ea3..07545a463 100644 --- a/manifests/agents/ml2/linuxbridge.pp +++ b/manifests/agents/ml2/linuxbridge.pp @@ -1,5 +1,6 @@ # == Class: neutron::agents::ml2::linuxbridge # +# DEPRECATED !! # Setups Linuxbridge Neutron agent for ML2 plugin. # # === Parameters @@ -96,6 +97,8 @@ class neutron::agents::ml2::linuxbridge ( include neutron::deps include neutron::params + warning('Support for the linuxbridge mechanism driver has been deprecated.') + resources { 'neutron_agent_linuxbridge': purge => $purge_config, } diff --git a/manifests/config.pp b/manifests/config.pp index f27531e98..2b0118645 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -33,9 +33,6 @@ # [*sriov_agent_config*] # (optional) Manage configuration of sriov_agent.ini # -# [*linuxbridge_agent_config*] -# (optional) Manage configuration of linuxbridge_agent.ini -# # [*macvtap_agent_config*] # (optional) Manage configuration of macvtap_agent.ini # @@ -95,6 +92,9 @@ # [*plugin_nsx_config*] # (optional) Manage configuration of plugins/vmware/nsx.ini # +# [*linuxbridge_agent_config*] +# (optional) Manage configuration of linuxbridge_agent.ini +# # NOTE: The configuration MUST NOT be already handled by this module # or Puppet catalog compilation will fail with duplicate resources. # @@ -103,7 +103,6 @@ class neutron::config ( $api_paste_ini = {}, $ovs_agent_config = {}, $sriov_agent_config = {}, - $linuxbridge_agent_config = {}, $macvtap_agent_config = {}, $bgpvpn_bagpipe_config = {}, $bgpvpn_service_config = {}, @@ -124,6 +123,7 @@ class neutron::config ( $plugin_nvp_config = undef, $plugin_linuxbridge_config = undef, $plugin_nsx_config = undef, + $linuxbridge_agent_config = undef, ) { include neutron::deps @@ -143,11 +143,18 @@ class neutron::config ( $plugin_nsx_config_real = {} } + if $linuxbridge_agent_config != undef { + warning('The linuxbridge_agent_config parameter is deprecated.') + $linuxbridge_agent_config_real = $linuxbridge_agent_config + } else { + $linuxbridge_agent_config_real = {} + } + validate_legacy(Hash, 'validate_hash', $server_config) validate_legacy(Hash, 'validate_hash', $api_paste_ini) validate_legacy(Hash, 'validate_hash', $ovs_agent_config) validate_legacy(Hash, 'validate_hash', $sriov_agent_config) - validate_legacy(Hash, 'validate_hash', $linuxbridge_agent_config) + validate_legacy(Hash, 'validate_hash', $linuxbridge_agent_config_real) validate_legacy(Hash, 'validate_hash', $macvtap_agent_config) validate_legacy(Hash, 'validate_hash', $bgpvpn_bagpipe_config) validate_legacy(Hash, 'validate_hash', $bgpvpn_service_config) @@ -170,7 +177,7 @@ class neutron::config ( create_resources('neutron_api_paste_ini', $api_paste_ini) create_resources('neutron_agent_ovs', $ovs_agent_config) create_resources('neutron_sriov_agent_config', $sriov_agent_config) - create_resources('neutron_agent_linuxbridge', $linuxbridge_agent_config) + create_resources('neutron_agent_linuxbridge', $linuxbridge_agent_config_real) create_resources('neutron_agent_macvtap', $macvtap_agent_config) create_resources('neutron_bgpvpn_bagpipe_config', $bgpvpn_bagpipe_config) create_resources('neutron_bgpvpn_service_config', $bgpvpn_service_config) diff --git a/manifests/plugins/ml2.pp b/manifests/plugins/ml2.pp index 5b129d363..968a6be53 100644 --- a/manifests/plugins/ml2.pp +++ b/manifests/plugins/ml2.pp @@ -48,7 +48,7 @@ # Should be an array that can have these elements: # logger, test, linuxbridge, openvswitch, hyperv, ncs, arista, cisco_nexus, # l2population, sriovnicswitch, macvtap -# Default to ['openvswitch', 'linuxbridge']. +# Default to ['openvswitch']. # # [*flat_networks*] # (optional) List of physical_network names with which flat networks @@ -127,7 +127,7 @@ class neutron::plugins::ml2 ( $type_drivers = ['local', 'flat', 'vlan', 'gre', 'vxlan', 'geneve'], $extension_drivers = $::os_service_default, $tenant_network_types = ['local', 'flat', 'vlan', 'gre', 'vxlan'], - $mechanism_drivers = ['openvswitch', 'linuxbridge'], + $mechanism_drivers = ['openvswitch'], $flat_networks = '*', $network_vlan_ranges = 'physnet1:1000:2999', $tunnel_id_ranges = '20:100', diff --git a/releasenotes/notes/deprecate-linuxbridge-c70a64f210cca859.yaml b/releasenotes/notes/deprecate-linuxbridge-c70a64f210cca859.yaml new file mode 100644 index 000000000..124c806ca --- /dev/null +++ b/releasenotes/notes/deprecate-linuxbridge-c70a64f210cca859.yaml @@ -0,0 +1,10 @@ +--- +upgrade: + - | + The linuxbridge mechanism driver is no longer enabled by default. + +deprecations: + - | + Support for the linuxbridge mechanism driver has been deprecated. + The feature is now marked as an experimental one in Neutron and is no + longer actively maintained. diff --git a/spec/classes/neutron_plugins_ml2_spec.rb b/spec/classes/neutron_plugins_ml2_spec.rb index e2e83a82c..0cf5cf89a 100644 --- a/spec/classes/neutron_plugins_ml2_spec.rb +++ b/spec/classes/neutron_plugins_ml2_spec.rb @@ -31,7 +31,7 @@ describe 'neutron::plugins::ml2' do { :type_drivers => ['local', 'flat', 'vlan', 'gre', 'vxlan', 'geneve'], :tenant_network_types => ['local', 'flat', 'vlan', 'gre', 'vxlan'], - :mechanism_drivers => ['openvswitch', 'linuxbridge'], + :mechanism_drivers => ['openvswitch'], :flat_networks => '*', :network_vlan_ranges => '10:50', :tunnel_id_ranges => '20:100',