From b34137a93ea046b50bae76e10fd00a52c6f74256 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Wed, 12 Feb 2020 11:32:13 +0000 Subject: [PATCH] Add ovs/igmp_snooping_enable support This patch is adding support to the "ovs/igmp_snooping_enable" configuration option in the ml2_conf.ini configuration file. Conflicts: manifests/agents/ml2/ovs.pp spec/classes/neutron_agents_ml2_ovs_spec.rb Related-Bug: #1868569 Change-Id: I1d96899de29cdd994f2a45b701923b0177a7edd8 Signed-off-by: Lucas Alvares Gomes (cherry picked from commit 382352a893c2a693eb10329365357282d68d75e4) (cherry picked from commit 4d5fd04844b58c84be7428a5bfcaab1b2f4d7eab) (cherry picked from commit 6e4f4e93afe5e13b1e1fd4943397e4efc97737cf) --- manifests/agents/ml2/ovs.pp | 13 +++++++++++++ spec/classes/neutron_agents_ml2_ovs_spec.rb | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/manifests/agents/ml2/ovs.pp b/manifests/agents/ml2/ovs.pp index f2572003c..6ddf6359b 100644 --- a/manifests/agents/ml2/ovs.pp +++ b/manifests/agents/ml2/ovs.pp @@ -178,6 +178,17 @@ # outgoing IP packet carrying GRE/VXLAN tunnel. # Defaults to $::os_service_default # +# [*igmp_snooping_enable*] +# (Optional) Enable IGMP snooping for integration bridge. If this +# option is set to True, support for Internet Group Management +# Protocol (IGMP) is enabled in integration bridge. +# Setting this option to True will also enable Open vSwitch +# mcast-snooping-disable-flood-unregistered flag. This option will +# disable flooding of unregistered multicast packets to all ports. +# The switch will send unregistered multicast packets only to ports +# connected to multicast routers. This option is used by the ML2/OVS +# mechanism driver for Neutron. +# Defaults to $::os_service_default # === Deprecated Parameters # # [*enable_tunneling*] @@ -219,6 +230,7 @@ class neutron::agents::ml2::ovs ( $permitted_ethertypes = $::os_service_default, $minimize_polling = $::os_service_default, $tunnel_csum = $::os_service_default, + $igmp_snooping_enable = $::os_service_default, # DEPRECATED PARAMETERS $enable_tunneling = false, ) { @@ -334,6 +346,7 @@ class neutron::agents::ml2::ovs ( 'ovs/ovsdb_interface': value => $ovsdb_interface; 'ovs/of_interface': value => $of_interface; 'securitygroup/enable_security_group': value => $enable_security_group; + 'ovs/igmp_snooping_enable': value => $igmp_snooping_enable; } if $firewall_driver { diff --git a/spec/classes/neutron_agents_ml2_ovs_spec.rb b/spec/classes/neutron_agents_ml2_ovs_spec.rb index 48d15921b..2c1643e4f 100644 --- a/spec/classes/neutron_agents_ml2_ovs_spec.rb +++ b/spec/classes/neutron_agents_ml2_ovs_spec.rb @@ -66,6 +66,7 @@ describe 'neutron::agents::ml2::ovs' do is_expected.to contain_neutron_agent_ovs('ovs/int_peer_patch_port').with_ensure('absent') is_expected.to contain_neutron_agent_ovs('ovs/tun_peer_patch_port').with_ensure('absent') is_expected.to contain_neutron_agent_ovs('agent/tunnel_types').with_ensure('absent') + is_expected.to contain_neutron_agent_ovs('ovs/igmp_snooping_enable').with_value(['']) end it 'installs neutron ovs agent package' do @@ -395,6 +396,16 @@ describe 'neutron::agents::ml2::ovs' do end end + context 'with IGMP snooping enabled' do + before :each do + params.merge!(:igmp_snooping_enable => true) + end + + it 'configure neutron/plugins/ml2/ml2_conf.ini' do + should contain_neutron_agent_ovs('ovs/igmp_snooping_enable').with_value(true) + end + end + end on_supported_os({