Browse Source

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>
changes/67/707367/8
Lucas Alvares Gomes 1 year ago
parent
commit
382352a893
4 changed files with 50 additions and 0 deletions
  1. +14
    -0
      manifests/agents/ml2/ovs.pp
  2. +14
    -0
      manifests/server.pp
  3. +11
    -0
      spec/classes/neutron_agents_ml2_ovs_spec.rb
  4. +11
    -0
      spec/classes/neutron_server_spec.rb

+ 14
- 0
manifests/agents/ml2/ovs.pp View File

@ -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 {


+ 14
- 0
manifests/server.pp View File

@ -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 {


+ 11
- 0
spec/classes/neutron_agents_ml2_ovs_spec.rb 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/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('<SERVICE DEFAULT>')
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({


+ 11
- 0
spec/classes/neutron_server_spec.rb View File

@ -77,6 +77,7 @@ describe 'neutron::server' do
:max_request_body_size => '<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
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


Loading…
Cancel
Save