diff --git a/manifests/agents/ml2/ovs.pp b/manifests/agents/ml2/ovs.pp index d61d2118f..492ba5dc0 100644 --- a/manifests/agents/ml2/ovs.pp +++ b/manifests/agents/ml2/ovs.pp @@ -168,6 +168,18 @@ # 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 # # [*ovsdb_interface*] @@ -208,6 +220,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 $ovsdb_interface = undef, ) { @@ -318,6 +331,7 @@ class neutron::agents::ml2::ovs ( 'ovs/datapath_type': value => $datapath_type; 'ovs/vhostuser_socket_dir': value => $vhostuser_socket_dir; 'securitygroup/enable_security_group': value => $enable_security_group; + 'ovs/igmp_snooping_enable': value => $igmp_snooping_enable; } if $firewall_driver { diff --git a/manifests/server.pp b/manifests/server.pp index 2f4181d5b..86cde905c 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -247,6 +247,18 @@ # (Optional) Name of Open vSwitch bridge to use # 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/OVN +# mechanism driver for Neutron. +# Defaults to $::os_service_default +# class neutron::server ( $package_ensure = 'present', $enabled = true, @@ -292,6 +304,7 @@ class neutron::server ( $enable_proxy_headers_parsing = $::os_service_default, $max_request_body_size = $::os_service_default, $ovs_integration_bridge = $::os_service_default, + $igmp_snooping_enable = $::os_service_default, ) inherits ::neutron::params { include neutron::deps @@ -390,6 +403,7 @@ class neutron::server ( 'DEFAULT/network_auto_schedule': value => $network_auto_schedule; 'DEFAULT/ovs_integration_bridge': value => $ovs_integration_bridge; 'service_providers/service_provider': value => $service_providers; + 'ovs/igmp_snooping_enable': value => $igmp_snooping_enable; } if $server_package { diff --git a/spec/classes/neutron_agents_ml2_ovs_spec.rb b/spec/classes/neutron_agents_ml2_ovs_spec.rb index 6380e2f5a..c276ba12c 100644 --- a/spec/classes/neutron_agents_ml2_ovs_spec.rb +++ b/spec/classes/neutron_agents_ml2_ovs_spec.rb @@ -64,6 +64,7 @@ describe 'neutron::agents::ml2::ovs' do should contain_neutron_agent_ovs('ovs/int_peer_patch_port').with_ensure('absent') should contain_neutron_agent_ovs('ovs/tun_peer_patch_port').with_ensure('absent') should contain_neutron_agent_ovs('agent/tunnel_types').with_ensure('absent') + should contain_neutron_agent_ovs('ovs/igmp_snooping_enable').with_value('') end it 'installs neutron ovs agent package' do @@ -357,6 +358,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({ diff --git a/spec/classes/neutron_server_spec.rb b/spec/classes/neutron_server_spec.rb index 668b76efb..1be5325fe 100644 --- a/spec/classes/neutron_server_spec.rb +++ b/spec/classes/neutron_server_spec.rb @@ -77,6 +77,7 @@ describe 'neutron::server' do :max_request_body_size => '', ) should contain_neutron_config('DEFAULT/ovs_integration_bridge').with_value('') + should contain_neutron_config('ovs/igmp_snooping_enable').with_value('') end context 'with manage_service as false' do @@ -268,6 +269,16 @@ describe 'neutron::server' do it { should contain_neutron_config('DEFAULT/ovs_integration_bridge').with_value('br-int') } end + context 'with IGMP snooping enabled' do + before :each do + params.merge!(:igmp_snooping_enable => true) + end + + it 'configure neutron.conf' do + should contain_neutron_config('ovs/igmp_snooping_enable').with_value(true) + end + end + end shared_examples 'VPNaaS and FWaaS package installation' do