[ovn metadata] Add more tunable parameters

For ml2 conf these are already added as part of [1], these
parameters are also needed in ovn metadata agent config
file, this patch takes care of it.

[1] https://review.opendev.org/q/I9a93b65aa5dbf4bca934aec82aad2f7f6ab3d73c

Change-Id: Ie0f7d0029412a16e4d9d43f408be97794b3518c0
This commit is contained in:
yatinkarel 2022-07-08 20:51:15 +05:30 committed by Takashi Kajinami
parent 7a7c469b85
commit 68a4d9a53d
3 changed files with 27 additions and 0 deletions

View File

@ -83,6 +83,15 @@
# (optional) Timeout in seconds for the OVSDB connection transaction # (optional) Timeout in seconds for the OVSDB connection transaction
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*ovsdb_retry_max_interval*]
# (optional) Max interval 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.
#
# [*root_helper*] # [*root_helper*]
# (optional) Use "sudo neutron-rootwrap /etc/neutron/rootwrap.conf" to use the real # (optional) Use "sudo neutron-rootwrap /etc/neutron/rootwrap.conf" to use the real
# root filter facility. Change to "sudo" to skip the filtering and just run the command # root filter facility. Change to "sudo" to skip the filtering and just run the command
@ -131,6 +140,8 @@ class neutron::agents::ovn_metadata (
$ovn_sb_certificate = $::os_service_default, $ovn_sb_certificate = $::os_service_default,
$ovn_sb_ca_cert = $::os_service_default, $ovn_sb_ca_cert = $::os_service_default,
$ovsdb_connection_timeout = $::os_service_default, $ovsdb_connection_timeout = $::os_service_default,
$ovsdb_retry_max_interval = $::os_service_default,
$ovsdb_probe_interval = $::os_service_default,
$root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', $root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf',
$root_helper_daemon = $::os_service_default, $root_helper_daemon = $::os_service_default,
$state_path = '/var/lib/neutron', $state_path = '/var/lib/neutron',
@ -170,6 +181,8 @@ class neutron::agents::ovn_metadata (
'agent/root_helper_daemon': value => $root_helper_daemon; 'agent/root_helper_daemon': value => $root_helper_daemon;
'ovs/ovsdb_connection': value => $ovsdb_connection; 'ovs/ovsdb_connection': value => $ovsdb_connection;
'ovs/ovsdb_connection_timeout': value => $ovsdb_connection_timeout; 'ovs/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/ovn_sb_connection': value => $ovn_sb_connection; 'ovn/ovn_sb_connection': value => $ovn_sb_connection;
'ovn/ovn_sb_private_key': value => $ovn_sb_private_key; 'ovn/ovn_sb_private_key': value => $ovn_sb_private_key;
'ovn/ovn_sb_certificate': value => $ovn_sb_certificate; 'ovn/ovn_sb_certificate': value => $ovn_sb_certificate;

View File

@ -0,0 +1,12 @@
---
features:
- |
The ``neutron::agents::ovn_metadata`` class now supports
the following two new parameters.
- ``ovsdb_probe_interval`` parameter to configure
``[ovn]ovsdb_probe_interval`` in ovn metadata agent config
file.
- ``ovsdb_retry_max_interval`` parameter to configure
``[ovn]ovsdb_retry_max_interval`` in ovn metadata agent
config file.

View File

@ -66,6 +66,8 @@ describe 'neutron::agents::ovn_metadata' do
should contain_ovn_metadata_agent_config('ovs/ovsdb_connection_timeout').with(:value => '<SERVICE DEFAULT>') should contain_ovn_metadata_agent_config('ovs/ovsdb_connection_timeout').with(:value => '<SERVICE DEFAULT>')
should contain_ovn_metadata_agent_config('ovs/ovsdb_connection').with(:value => params[:ovsdb_connection]) should contain_ovn_metadata_agent_config('ovs/ovsdb_connection').with(:value => params[:ovsdb_connection])
should contain_ovn_metadata_agent_config('ovn/ovn_sb_connection').with(:value => '<SERVICE DEFAULT>') should contain_ovn_metadata_agent_config('ovn/ovn_sb_connection').with(:value => '<SERVICE DEFAULT>')
should contain_ovn_metadata_agent_config('ovn/ovsdb_retry_max_interval').with(:value => '<SERVICE DEFAULT>')
should contain_ovn_metadata_agent_config('ovn/ovsdb_probe_interval').with(:value => '<SERVICE DEFAULT>')
end end
it 'installs ovn metadata agent package' do it 'installs ovn metadata agent package' do