From 3b1337c8ba8e3328a1acf82485e989490fd9a9fe Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 16 Jan 2024 11:37:28 +0900 Subject: [PATCH] Support options for FDB aging and MAC_Binding aging This introduces support for the options used by aging mechanism for FDB entries and MAC_Binding entries, which were added during this cycle. Depends-on: https://review.opendev.org/893333 Depneds-on: https://review.opendev.org/893575 Change-Id: Ie4d7829e917c1082d7c17b7aef85445cbfd92d93 --- manifests/plugins/ml2/ovn.pp | 24 +++++++++++++++++++ ...vn-fdb-and-mac-aging-76e238868cb4e941.yaml | 5 ++++ spec/classes/neutron_plugins_ml2_ovn_spec.rb | 16 +++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 releasenotes/notes/ovn-fdb-and-mac-aging-76e238868cb4e941.yaml diff --git a/manifests/plugins/ml2/ovn.pp b/manifests/plugins/ml2/ovn.pp index 68466ecfc..480da1f46 100644 --- a/manifests/plugins/ml2/ovn.pp +++ b/manifests/plugins/ml2/ovn.pp @@ -113,11 +113,27 @@ # Type: boolean # Defaults to $facts['os_service_default'] # +# [*fdb_age_threshold*] +# (optional) The number of seconds to keep FD entries in the OVN DB. +# Defaults to $facts['os_service_default'] +# +# [*mac_binding_age_threshold*] +# (optional) The number of seconds to keep MAC_Binding entries in the OVN DB. +# Defaults to $facts['os_service_default'] +# # [*ignore_lsp_down*] # (optional) Do not install ARP/ND reply flows for logical switch ports # if the port is DOWN. # Defaults to $facts['os_service_default'] # +# [*fdb_removal_limit*] +# (optional) FDB aging bulk removal limit. +# Defaults to $facts['os_service_default'] +# +# [*mac_binding_removal_limit*] +# (optional) MAC binding aging bulk removal limit. +# Defaults to $facts['os_service_default'] +# # [*network_log_rate_limit*] # (Optional) Maximum packets logging per second. # Used by logging service plugin. @@ -156,7 +172,11 @@ class neutron::plugins::ml2::ovn( $vhostuser_socket_dir = $facts['os_service_default'], $ovn_emit_need_to_frag = $facts['os_service_default'], $localnet_learn_fdb = $facts['os_service_default'], + $fdb_age_threshold = $facts['os_service_default'], + $mac_binding_age_threshold = $facts['os_service_default'], $ignore_lsp_down = $facts['os_service_default'], + $fdb_removal_limit = $facts['os_service_default'], + $mac_binding_removal_limit = $facts['os_service_default'], $network_log_rate_limit = $facts['os_service_default'], $network_log_burst_limit = $facts['os_service_default'], $network_log_local_output_log_base = $facts['os_service_default'], @@ -189,7 +209,11 @@ class neutron::plugins::ml2::ovn( 'ovn/vhost_sock_dir' : value => $vhostuser_socket_dir; 'ovn/ovn_emit_need_to_frag' : value => $ovn_emit_need_to_frag; 'ovn/localnet_learn_fdb' : value => $localnet_learn_fdb; + 'ovn/fdb_age_threshold' : value => $fdb_age_threshold; + 'ovn/mac_binding_age_threshold' : value => $mac_binding_age_threshold; 'ovn_nb_global/ignore_lsp_down' : value => $ignore_lsp_down; + 'ovn_nb_global/fdb_removal_limit' : value => $fdb_removal_limit; + 'ovn_nb_global/mac_binding_removal_limit' : value => $mac_binding_removal_limit; 'network_log/rate_limit' : value => $network_log_rate_limit; 'network_log/burst_limit' : value => $network_log_burst_limit; 'network_log/local_output_log_base' : value => $network_log_local_output_log_base; diff --git a/releasenotes/notes/ovn-fdb-and-mac-aging-76e238868cb4e941.yaml b/releasenotes/notes/ovn-fdb-and-mac-aging-76e238868cb4e941.yaml new file mode 100644 index 000000000..6e1554adf --- /dev/null +++ b/releasenotes/notes/ovn-fdb-and-mac-aging-76e238868cb4e941.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The ``neutron::plugins::ml2::ovn`` class now supports the options used by + FDB aging and MAC_Binding aging. diff --git a/spec/classes/neutron_plugins_ml2_ovn_spec.rb b/spec/classes/neutron_plugins_ml2_ovn_spec.rb index 8e1de1f59..255f98286 100644 --- a/spec/classes/neutron_plugins_ml2_ovn_spec.rb +++ b/spec/classes/neutron_plugins_ml2_ovn_spec.rb @@ -29,7 +29,11 @@ describe 'neutron::plugins::ml2::ovn' do :vhostuser_socket_dir => '', :ovn_emit_need_to_frag => '', :localnet_learn_fdb => '', + :fdb_age_threshold => '', + :mac_binding_age_threshold => '', :ignore_lsp_down => '', + :fdb_removal_limit => '', + :mac_binding_removal_limit => '', :network_log_rate_limit => '', :network_log_burst_limit => '', :network_log_local_output_log_base => '', @@ -66,7 +70,11 @@ describe 'neutron::plugins::ml2::ovn' do should contain_neutron_plugin_ml2('ovn/vhost_sock_dir').with_value(p[:vhostuser_socket_dir]) should contain_neutron_plugin_ml2('ovn/ovn_emit_need_to_frag').with_value(p[:ovn_emit_need_to_frag]) should contain_neutron_plugin_ml2('ovn/localnet_learn_fdb').with_value(p[:localnet_learn_fdb]) + should contain_neutron_plugin_ml2('ovn/fdb_age_threshold').with_value(p[:fdb_age_threshold]) + should contain_neutron_plugin_ml2('ovn/mac_binding_age_threshold').with_value(p[:mac_binding_age_threshold]) should contain_neutron_plugin_ml2('ovn_nb_global/ignore_lsp_down').with_value(p[:ignore_lsp_down]) + should contain_neutron_plugin_ml2('ovn_nb_global/fdb_removal_limit').with_value(p[:fdb_removal_limit]) + should contain_neutron_plugin_ml2('ovn_nb_global/mac_binding_removal_limit').with_value(p[:mac_binding_removal_limit]) should contain_neutron_plugin_ml2('network_log/rate_limit').with_value(p[:network_log_rate_limit]) should contain_neutron_plugin_ml2('network_log/burst_limit').with_value(p[:network_log_burst_limit]) should contain_neutron_plugin_ml2('network_log/local_output_log_base').with_value(p[:network_log_local_output_log_base]) @@ -93,7 +101,11 @@ describe 'neutron::plugins::ml2::ovn' do :dns_servers => '8.8.8.8,10.10.10.10', :ovn_emit_need_to_frag => false, :localnet_learn_fdb => false, + :fdb_age_threshold => 10, + :mac_binding_age_threshold => 11, :ignore_lsp_down => false, + :fdb_removal_limit => 12, + :mac_binding_removal_limit => 13, } end @@ -116,7 +128,11 @@ describe 'neutron::plugins::ml2::ovn' do should contain_neutron_plugin_ml2('ovn/vhost_sock_dir').with_value(p[:vhostuser_socket_dir]) should contain_neutron_plugin_ml2('ovn/ovn_emit_need_to_frag').with_value(p[:ovn_emit_need_to_frag]) should contain_neutron_plugin_ml2('ovn/localnet_learn_fdb').with_value(p[:localnet_learn_fdb]) + should contain_neutron_plugin_ml2('ovn/fdb_age_threshold').with_value(p[:fdb_age_threshold]) + should contain_neutron_plugin_ml2('ovn/mac_binding_age_threshold').with_value(p[:mac_binding_age_threshold]) should contain_neutron_plugin_ml2('ovn_nb_global/ignore_lsp_down').with_value(p[:ignore_lsp_down]) + should contain_neutron_plugin_ml2('ovn_nb_global/fdb_removal_limit').with_value(p[:fdb_removal_limit]) + should contain_neutron_plugin_ml2('ovn_nb_global/mac_binding_removal_limit').with_value(p[:mac_binding_removal_limit]) should contain_neutron_plugin_ml2('network_log/rate_limit').with_value(p[:network_log_rate_limit]) should contain_neutron_plugin_ml2('network_log/burst_limit').with_value(p[:network_log_burst_limit]) should contain_neutron_plugin_ml2('network_log/local_output_log_base').with_value(p[:network_log_local_output_log_base])