diff --git a/manifests/plugins/ml2/ovn.pp b/manifests/plugins/ml2/ovn.pp index 043b8cca4..c4c560127 100644 --- a/manifests/plugins/ml2/ovn.pp +++ b/manifests/plugins/ml2/ovn.pp @@ -91,6 +91,16 @@ # (optional) The vhost-user socket directory for OVS # Type: String # Defaults to $::os_service_default +# +# [*ovn_emit_need_to_frag*] +# (optional) Configure OVN to emit "need to frag" packets in case +# of MTU mismatch. Before enabling this configuration make +# sure that its supported by the host kernel (version >= +# 5.2) or by checking the output of the following command: +# ovs-appctl -t ovs-vswitchd dpif/show-dp-features br-int | +# grep "Check pkt length action". +# Type: boolean +# Defaults to $::os_service_default class neutron::plugins::ml2::ovn( $ovn_nb_connection = $::os_service_default, @@ -110,6 +120,7 @@ class neutron::plugins::ml2::ovn( $dvr_enabled = $::os_service_default, $dns_servers = $::os_service_default, $vhostuser_socket_dir = $::os_service_default, + $ovn_emit_need_to_frag = $::os_service_default, ) { include ::neutron::deps @@ -151,5 +162,6 @@ class neutron::plugins::ml2::ovn( 'ovn/enable_distributed_floating_ip' : value => $dvr_enabled; 'ovn/dns_servers' : value => join(any2array($dns_servers), ','); 'ovn/vhost_sock_dir' : value => $vhostuser_socket_dir; + 'ovn/ovn_emit_need_to_frag' : value => $ovn_emit_need_to_frag; } } diff --git a/releasenotes/notes/ovn-emit-need-to-frag-config-option-89c716cd33592bea.yaml b/releasenotes/notes/ovn-emit-need-to-frag-config-option-89c716cd33592bea.yaml new file mode 100644 index 000000000..1a34c1140 --- /dev/null +++ b/releasenotes/notes/ovn-emit-need-to-frag-config-option-89c716cd33592bea.yaml @@ -0,0 +1,11 @@ +--- +features: + - | + Add a new configuration option called "ovn_emit_need_to_frag" to + the "ovn" section of etc/neutron/plugins/ml2_conf.ini. This new + option tells ovn whether it should emit "need to frag" packets + in case of MTU mismatch. Before enabling this configuration make + sure that its supported by the host kernel (version >= 5.2) or + by checking the output of the following command: ovs-appctl -t + ovs-vswitchd dpif/show-dp-features br-int | grep "Check pkt length + action". Defaults to False. diff --git a/spec/classes/neutron_plugins_ml2_ovn_spec.rb b/spec/classes/neutron_plugins_ml2_ovn_spec.rb index 37fa90a77..8303b8753 100644 --- a/spec/classes/neutron_plugins_ml2_ovn_spec.rb +++ b/spec/classes/neutron_plugins_ml2_ovn_spec.rb @@ -25,6 +25,7 @@ describe 'neutron::plugins::ml2::ovn' do :vif_type => 'ovs', :dvr_enabled => false, :dns_servers => ['8.8.8.8', '10.10.10.10'], + :ovn_emit_need_to_frag => false, } end @@ -54,6 +55,7 @@ describe 'neutron::plugins::ml2::ovn' do should contain_neutron_plugin_ml2('ovn/enable_distributed_floating_ip').with_value(params[:dvr_enabled]) should contain_neutron_plugin_ml2('ovn/dns_servers').with_value(params[:dns_servers].join(',')) should contain_neutron_plugin_ml2('ovn/vhost_sock_dir').with_value('') + should contain_neutron_plugin_ml2('ovn/ovn_emit_need_to_frag').with_value(params[:ovn_emit_need_to_frag]) end end @@ -93,6 +95,15 @@ describe 'neutron::plugins::ml2::ovn' do should contain_neutron_plugin_ml2('ovn/enable_distributed_floating_ip').with_value(params[:dvr_enabled]) end end + + context 'with emit need to fragment enabled' do + before :each do + params.merge!(:ovn_emit_need_to_frag => true) + end + it 'should enable emit need to fragment option' do + should contain_neutron_plugin_ml2('ovn/ovn_emit_need_to_frag').with_value(params[:ovn_emit_need_to_frag]) + end + end end on_supported_os({