ml2+ovn: Add more tunable parameters for OVN DB connections

Change-Id: I9a93b65aa5dbf4bca934aec82aad2f7f6ab3d73c
This commit is contained in:
Takashi Kajinami 2021-11-09 21:16:12 +09:00
parent 70fe4887a1
commit 85db34491e
3 changed files with 26 additions and 1 deletions

View File

@ -48,6 +48,15 @@
# (optional) Timeout in seconds for the OVSDB connection transaction
# Defaults to $::os_service_default
#
# [*ovsdb_retry_max_interval*]
# (optional) Max intervla in seconds between each retry to get the OVN NB
# and SB IDLs.
# Defaults to $::os_service_default
#
# [*ovsdb_probe_interval*]
# (optional) The probe interval for the OVSDB session in milliseconds.
# Defaults to $::os_service_default.
#
# [*neutron_sync_mode*]
# (optional) The synchronization mode of OVN with Neutron DB.
# Valid values are - 'log', 'off', 'repair'
@ -132,6 +141,8 @@ class neutron::plugins::ml2::ovn(
$ovn_sb_ca_cert = $::os_service_default,
$package_ensure = 'present',
$ovsdb_connection_timeout = $::os_service_default,
$ovsdb_retry_max_interval = $::os_service_default,
$ovsdb_probe_interval = $::os_service_default,
$neutron_sync_mode = $::os_service_default,
$ovn_metadata_enabled = $::os_service_default,
$dvr_enabled = $::os_service_default,
@ -171,6 +182,8 @@ class neutron::plugins::ml2::ovn(
'ovn/ovn_sb_certificate' : value => $ovn_sb_certificate;
'ovn/ovn_sb_ca_cert' : value => $ovn_sb_ca_cert;
'ovn/ovsdb_connection_timeout' : value => $ovsdb_connection_timeout;
'ovn/ovsdb_retry_max_interval' : value => $ovsdb_retry_max_interval;
'ovn/ovsdb_probe_interval' : value => $ovsdb_probe_interval;
'ovn/neutron_sync_mode' : value => $neutron_sync_mode;
'ovn/ovn_metadata_enabled' : value => $ovn_metadata_enabled;
'ovn/enable_distributed_floating_ip': value => $dvr_enabled;

View File

@ -0,0 +1,8 @@
---
features:
- |
The ``neutron::plugins::ml2::ovn`` class now supports the following two
new parameters.
- ``ovsdb_retry_max_interval``
- ``ovsdb_probe_interval``

View File

@ -19,7 +19,9 @@ describe 'neutron::plugins::ml2::ovn' do
:ovn_sb_private_key => 'sb_key',
:ovn_sb_certificate => 'sb_cert',
:ovn_sb_ca_cert => 'sb_ca_cert',
:ovsdb_connection_timeout => '60',
:ovsdb_connection_timeout => 60,
:ovsdb_retry_max_interval => 180,
:ovsdb_probe_interval => 60000,
:neutron_sync_mode => 'log',
:dvr_enabled => false,
:dns_servers => ['8.8.8.8', '10.10.10.10'],
@ -47,6 +49,8 @@ describe 'neutron::plugins::ml2::ovn' do
should contain_neutron_plugin_ml2('ovn/ovn_sb_certificate').with_value(params[:ovn_sb_certificate])
should contain_neutron_plugin_ml2('ovn/ovn_sb_ca_cert').with_value(params[:ovn_sb_ca_cert])
should contain_neutron_plugin_ml2('ovn/ovsdb_connection_timeout').with_value(params[:ovsdb_connection_timeout])
should contain_neutron_plugin_ml2('ovn/ovsdb_retry_max_interval').with_value(params[:ovsdb_retry_max_interval])
should contain_neutron_plugin_ml2('ovn/ovsdb_probe_interval').with_value(params[:ovsdb_probe_interval])
should contain_neutron_plugin_ml2('ovn/neutron_sync_mode').with_value(params[:neutron_sync_mode])
should contain_neutron_plugin_ml2('ovn/enable_distributed_floating_ip').with_value(params[:dvr_enabled])
should contain_neutron_plugin_ml2('ovn/dns_servers').with_value(params[:dns_servers].join(','))