Merge "Update configuration for ovs integration bridge"

This commit is contained in:
Zuul 2020-06-18 16:46:04 +00:00 committed by Gerrit Code Review
commit 870a38a233
7 changed files with 54 additions and 20 deletions

View File

@ -163,10 +163,15 @@ class neutron::agents::dhcp (
'DEFAULT/dnsmasq_dns_servers': value => join(any2array($dnsmasq_dns_servers), ','); 'DEFAULT/dnsmasq_dns_servers': value => join(any2array($dnsmasq_dns_servers), ',');
'DEFAULT/dnsmasq_local_resolv': value => $dnsmasq_local_resolv; 'DEFAULT/dnsmasq_local_resolv': value => $dnsmasq_local_resolv;
'DEFAULT/dnsmasq_enable_addr6_list': value => $dnsmasq_enable_addr6_list; 'DEFAULT/dnsmasq_enable_addr6_list': value => $dnsmasq_enable_addr6_list;
'DEFAULT/ovs_integration_bridge': value => $ovs_integration_bridge;
'agent/availability_zone': value => $availability_zone; 'agent/availability_zone': value => $availability_zone;
} }
# DEFAULT/ovs_intergation_bridge was deprecated in favor of
# ovs/intergation_bridge. Make sure to purge the old parameter
neutron_dhcp_agent_config {
'DEFAULT/ovs_integration_bridge': ensure => 'absent'
}
if $ovsdb_connection =~ /^ssl:/ { if $ovsdb_connection =~ /^ssl:/ {
$req_ssl_opts = { $req_ssl_opts = {
'ovsdb_agent_ssl_key_file' => $ovsdb_agent_ssl_key_file, 'ovsdb_agent_ssl_key_file' => $ovsdb_agent_ssl_key_file,
@ -183,10 +188,11 @@ class neutron::agents::dhcp (
} }
neutron_dhcp_agent_config { neutron_dhcp_agent_config {
'OVS/ovsdb_connection': value => $ovsdb_connection; 'OVS/ovsdb_connection': value => $ovsdb_connection;
'OVS/ssl_key_file': value => $ovsdb_agent_ssl_key_file; 'OVS/integration_bridge': value => $ovs_integration_bridge;
'OVS/ssl_cert_file': value => $ovsdb_agent_ssl_cert_file; 'OVS/ssl_key_file': value => $ovsdb_agent_ssl_key_file;
'OVS/ssl_ca_cert_file': value => $ovsdb_agent_ssl_ca_file; 'OVS/ssl_cert_file': value => $ovsdb_agent_ssl_cert_file;
'OVS/ssl_ca_cert_file': value => $ovsdb_agent_ssl_ca_file;
} }
if $::neutron::params::dhcp_agent_package { if $::neutron::params::dhcp_agent_package {

View File

@ -91,6 +91,10 @@
# will be passed. # will be passed.
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*ovs_integration_bridge*]
# (optional) Name of Open vSwitch bridge to use
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
# #
# [*gateway_external_network_id*] # [*gateway_external_network_id*]
@ -117,6 +121,7 @@ class neutron::agents::l3 (
$availability_zone = $::os_service_default, $availability_zone = $::os_service_default,
$extensions = $::os_service_default, $extensions = $::os_service_default,
$radvd_user = $::os_service_default, $radvd_user = $::os_service_default,
$ovs_integration_bridge = $::os_service_default,
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$gateway_external_network_id = undef, $gateway_external_network_id = undef,
) { ) {
@ -145,17 +150,18 @@ class neutron::agents::l3 (
} }
neutron_l3_agent_config { neutron_l3_agent_config {
'DEFAULT/debug': value => $debug; 'DEFAULT/debug': value => $debug;
'DEFAULT/interface_driver': value => $interface_driver; 'DEFAULT/interface_driver': value => $interface_driver;
'DEFAULT/handle_internal_only_routers': value => $handle_internal_only_routers; 'DEFAULT/handle_internal_only_routers': value => $handle_internal_only_routers;
'DEFAULT/metadata_port': value => $metadata_port; 'DEFAULT/metadata_port': value => $metadata_port;
'DEFAULT/periodic_interval': value => $periodic_interval; 'DEFAULT/periodic_interval': value => $periodic_interval;
'DEFAULT/periodic_fuzzy_delay': value => $periodic_fuzzy_delay; 'DEFAULT/periodic_fuzzy_delay': value => $periodic_fuzzy_delay;
'DEFAULT/enable_metadata_proxy': value => $enable_metadata_proxy; 'DEFAULT/enable_metadata_proxy': value => $enable_metadata_proxy;
'DEFAULT/agent_mode': value => $agent_mode; 'DEFAULT/agent_mode': value => $agent_mode;
'DEFAULT/radvd_user': value => $radvd_user; 'DEFAULT/radvd_user': value => $radvd_user;
'agent/availability_zone': value => $availability_zone; 'ovs/integration_bridge': value => $ovs_integration_bridge;
'agent/extensions': value => $extensions; 'agent/availability_zone': value => $availability_zone;
'agent/extensions': value => $extensions;
} }
if $::neutron::params::l3_agent_package { if $::neutron::params::l3_agent_package {

View File

@ -404,11 +404,17 @@ class neutron::server (
'DEFAULT/dhcp_load_type': value => $dhcp_load_type; 'DEFAULT/dhcp_load_type': value => $dhcp_load_type;
'DEFAULT/default_availability_zones': value => join(any2array($default_availability_zones), ','); 'DEFAULT/default_availability_zones': value => join(any2array($default_availability_zones), ',');
'DEFAULT/network_auto_schedule': value => $network_auto_schedule; 'DEFAULT/network_auto_schedule': value => $network_auto_schedule;
'DEFAULT/ovs_integration_bridge': value => $ovs_integration_bridge; '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; 'ovs/igmp_snooping_enable': value => $igmp_snooping_enable;
} }
# DEFAULT/ovs_intergation_bridge was deprecated in favor of
# ovs/intergation_bridge. Make sure to purge the old parameter
neutron_config {
'DEFAULT/ovs_integration_bridge': ensure => 'absent'
}
if $server_package { if $server_package {
package { 'neutron-server': package { 'neutron-server':
ensure => $package_ensure, ensure => $package_ensure,

View File

@ -0,0 +1,6 @@
---
features:
- |
The new ``neutron::agent::l3::ovs_integration_bridge`` parameter was added
so that operators can set customized integration bridge name in l3 agent
configuration.

View File

@ -41,11 +41,11 @@ describe 'neutron::agents::dhcp' do
should contain_neutron_dhcp_agent_config('DEFAULT/force_metadata').with_value('<SERVICE DEFAULT>'); should contain_neutron_dhcp_agent_config('DEFAULT/force_metadata').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('DEFAULT/enable_metadata_network').with_value(p[:enable_metadata_network]); should contain_neutron_dhcp_agent_config('DEFAULT/enable_metadata_network').with_value(p[:enable_metadata_network]);
should contain_neutron_dhcp_agent_config('DEFAULT/dhcp_broadcast_reply').with_value('<SERVICE DEFAULT>'); should contain_neutron_dhcp_agent_config('DEFAULT/dhcp_broadcast_reply').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('DEFAULT/ovs_integration_bridge').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('DEFAULT/dnsmasq_local_resolv').with_value('<SERVICE DEFAULT>'); should contain_neutron_dhcp_agent_config('DEFAULT/dnsmasq_local_resolv').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('DEFAULT/dnsmasq_enable_addr6_list').with_value('<SERVICE DEFAULT>'); should contain_neutron_dhcp_agent_config('DEFAULT/dnsmasq_enable_addr6_list').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('agent/availability_zone').with_value('<SERVICE DEFAULT>'); should contain_neutron_dhcp_agent_config('agent/availability_zone').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('OVS/ovsdb_connection').with_value('<SERVICE DEFAULT>'); should contain_neutron_dhcp_agent_config('OVS/ovsdb_connection').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('OVS/integration_bridge').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('OVS/ssl_key_file').with_value('<SERVICE DEFAULT>'); should contain_neutron_dhcp_agent_config('OVS/ssl_key_file').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('OVS/ssl_cert_file').with_value('<SERVICE DEFAULT>'); should contain_neutron_dhcp_agent_config('OVS/ssl_cert_file').with_value('<SERVICE DEFAULT>');
should contain_neutron_dhcp_agent_config('OVS/ssl_ca_cert_file').with_value('<SERVICE DEFAULT>'); should contain_neutron_dhcp_agent_config('OVS/ssl_ca_cert_file').with_value('<SERVICE DEFAULT>');

View File

@ -38,6 +38,7 @@ describe 'neutron::agents::l3' do
should contain_neutron_l3_agent_config('DEFAULT/periodic_fuzzy_delay').with_value('<SERVICE DEFAULT>') should contain_neutron_l3_agent_config('DEFAULT/periodic_fuzzy_delay').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('DEFAULT/enable_metadata_proxy').with_value('<SERVICE DEFAULT>') should contain_neutron_l3_agent_config('DEFAULT/enable_metadata_proxy').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('DEFAULT/radvd_user').with_value('<SERVICE DEFAULT>') should contain_neutron_l3_agent_config('DEFAULT/radvd_user').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('ovs/integration_bridge').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('agent/availability_zone').with_value('<SERVICE DEFAULT>') should contain_neutron_l3_agent_config('agent/availability_zone').with_value('<SERVICE DEFAULT>')
should contain_neutron_l3_agent_config('agent/extensions').with_value('<SERVICE DEFAULT>') should contain_neutron_l3_agent_config('agent/extensions').with_value('<SERVICE DEFAULT>')
end end
@ -110,6 +111,15 @@ describe 'neutron::agents::l3' do
end end
end end
context 'with ovs_integration_bridge' do
before :each do
params.merge!(:ovs_integration_bridge => 'br-int')
end
it 'should configure ovs_integration_bridge' do
should contain_neutron_l3_agent_config('ovs/integration_bridge').with_value(p[:ovs_integration_bridge])
end
end
context 'with availability zone' do context 'with availability zone' do
before :each do before :each do
params.merge!(:availability_zone => 'zone1') params.merge!(:availability_zone => 'zone1')

View File

@ -69,7 +69,7 @@ describe 'neutron::server' do
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>', :enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
: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('ovs/integration_bridge').with_value('<SERVICE DEFAULT>')
should contain_neutron_config('ovs/igmp_snooping_enable').with_value('<SERVICE DEFAULT>') should contain_neutron_config('ovs/igmp_snooping_enable').with_value('<SERVICE DEFAULT>')
end end
@ -259,7 +259,7 @@ describe 'neutron::server' do
params.merge!({:ovs_integration_bridge => 'br-int' }) params.merge!({:ovs_integration_bridge => 'br-int' })
end end
it { should contain_neutron_config('DEFAULT/ovs_integration_bridge').with_value('br-int') } it { should contain_neutron_config('ovs/integration_bridge').with_value('br-int') }
end end
context 'with IGMP snooping enabled' do context 'with IGMP snooping enabled' do