Add ovs/igmp_snooping_enable support

This patch is adding support to the "ovs/igmp_snooping_enable"
configuration option in the neutron.conf and ml2_conf.ini configuration
files.

Both, ML2/OVS and ML2/OVN reuse the same configuration option to enable
IGMP but, for ML2/OVN this option could can be set in the neutron.conf
(since it will be consumed on the controllers) and and for ML2/OVS it's
configured for the agents (ml2_conf.ini)

Change-Id: I1d96899de29cdd994f2a45b701923b0177a7edd8
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
This commit is contained in:
Lucas Alvares Gomes 2020-02-12 11:32:13 +00:00
parent b646b7cf1a
commit 382352a893
4 changed files with 50 additions and 0 deletions

View File

@ -168,6 +168,18 @@
# outgoing IP packet carrying GRE/VXLAN tunnel. # outgoing IP packet carrying GRE/VXLAN tunnel.
# Defaults to $::os_service_default # 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 # DEPRECATED
# #
# [*ovsdb_interface*] # [*ovsdb_interface*]
@ -208,6 +220,7 @@ class neutron::agents::ml2::ovs (
$permitted_ethertypes = $::os_service_default, $permitted_ethertypes = $::os_service_default,
$minimize_polling = $::os_service_default, $minimize_polling = $::os_service_default,
$tunnel_csum = $::os_service_default, $tunnel_csum = $::os_service_default,
$igmp_snooping_enable = $::os_service_default,
# DEPRECATED # DEPRECATED
$ovsdb_interface = undef, $ovsdb_interface = undef,
) { ) {
@ -318,6 +331,7 @@ class neutron::agents::ml2::ovs (
'ovs/datapath_type': value => $datapath_type; 'ovs/datapath_type': value => $datapath_type;
'ovs/vhostuser_socket_dir': value => $vhostuser_socket_dir; 'ovs/vhostuser_socket_dir': value => $vhostuser_socket_dir;
'securitygroup/enable_security_group': value => $enable_security_group; 'securitygroup/enable_security_group': value => $enable_security_group;
'ovs/igmp_snooping_enable': value => $igmp_snooping_enable;
} }
if $firewall_driver { if $firewall_driver {

View File

@ -247,6 +247,18 @@
# (Optional) Name of Open vSwitch bridge to use # (Optional) Name of Open vSwitch bridge to use
# Defaults to $::os_service_default # 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 ( class neutron::server (
$package_ensure = 'present', $package_ensure = 'present',
$enabled = true, $enabled = true,
@ -292,6 +304,7 @@ class neutron::server (
$enable_proxy_headers_parsing = $::os_service_default, $enable_proxy_headers_parsing = $::os_service_default,
$max_request_body_size = $::os_service_default, $max_request_body_size = $::os_service_default,
$ovs_integration_bridge = $::os_service_default, $ovs_integration_bridge = $::os_service_default,
$igmp_snooping_enable = $::os_service_default,
) inherits ::neutron::params { ) inherits ::neutron::params {
include neutron::deps include neutron::deps
@ -390,6 +403,7 @@ class neutron::server (
'DEFAULT/network_auto_schedule': value => $network_auto_schedule; 'DEFAULT/network_auto_schedule': value => $network_auto_schedule;
'DEFAULT/ovs_integration_bridge': value => $ovs_integration_bridge; 'DEFAULT/ovs_integration_bridge': value => $ovs_integration_bridge;
'service_providers/service_provider': value => $service_providers; 'service_providers/service_provider': value => $service_providers;
'ovs/igmp_snooping_enable': value => $igmp_snooping_enable;
} }
if $server_package { if $server_package {

View File

@ -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/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('ovs/tun_peer_patch_port').with_ensure('absent')
should contain_neutron_agent_ovs('agent/tunnel_types').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('<SERVICE DEFAULT>')
end end
it 'installs neutron ovs agent package' do it 'installs neutron ovs agent package' do
@ -357,6 +358,16 @@ describe 'neutron::agents::ml2::ovs' do
end end
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 end
on_supported_os({ on_supported_os({

View File

@ -77,6 +77,7 @@ describe 'neutron::server' do
:max_request_body_size => '<SERVICE DEFAULT>', :max_request_body_size => '<SERVICE DEFAULT>',
) )
should contain_neutron_config('DEFAULT/ovs_integration_bridge').with_value('<SERVICE DEFAULT>') should contain_neutron_config('DEFAULT/ovs_integration_bridge').with_value('<SERVICE DEFAULT>')
should contain_neutron_config('ovs/igmp_snooping_enable').with_value('<SERVICE DEFAULT>')
end end
context 'with manage_service as false' do 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') } it { should contain_neutron_config('DEFAULT/ovs_integration_bridge').with_value('br-int') }
end 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 end
shared_examples 'VPNaaS and FWaaS package installation' do shared_examples 'VPNaaS and FWaaS package installation' do