Add posibilities to set ovn_openflow_probe_interval for controller

Change-Id: I98c7b16c6051e174e515bfa9a81a3fb55267aacf
This commit is contained in:
Kamil Sambor 2019-09-20 08:17:04 +02:00
parent 3ce7790a5f
commit d1331a6254
3 changed files with 48 additions and 26 deletions

View File

@ -55,6 +55,13 @@
# (optional) Set probe interval, based on user configuration, value is in ms
# Defaults to 60000
#
# [*ovn_openflow_probe_interval*]
# (optional) The inactivity probe interval of the OpenFlow
# connection to the OpenvSwitch integration bridge, in
# seconds. If the value is zero, it disables the connection keepalive feature.
# If the value is nonzero, then it will be forced to a value of at least 5s.
# Defaults to 60
#
class ovn::controller(
$ovn_remote,
$ovn_encap_ip,
@ -68,6 +75,7 @@ class ovn::controller(
$datapath_type = $::os_service_default,
$enable_dpdk = false,
$ovn_remote_probe_interval = 60000,
$ovn_openflow_probe_interval = 60,
) {
include ::ovn::params
@ -109,6 +117,7 @@ class ovn::controller(
'external_ids:hostname' => { 'value' => $hostname },
'external_ids:ovn-bridge' => { 'value' => $ovn_bridge },
'external_ids:ovn-remote-probe-interval' => { 'value' => "${ovn_remote_probe_interval}" },
'external_ids:ovn-openflow-probe-interval' => { 'value' => "${ovn_openflow_probe_interval}" },
}
if !empty($ovn_bridge_mappings) {

View File

@ -0,0 +1,8 @@
---
features:
- |
Added new param for puppet to set ovn_openflow_probe_interval which
is inactivity probe interval of the OpenFlow connection to the OpenvSwitch
integration bridge, in seconds. If the value is zero, it disables the connection
keepalive feature, by default this value is set on 60s.
If the value is nonzero, then it will be forced to a value of at least 5s.

View File

@ -13,6 +13,7 @@ describe 'ovn::controller' do
:enable_hw_offload => false,
:mac_table_size => 20000,
:ovn_remote_probe_interval => 30000,
:ovn_openflow_probe_interval => 8,
}
end
@ -67,6 +68,10 @@ describe 'ovn::controller' do
is_expected.to contain_vs_config('external_ids:ovn-remote-probe-interval').with(
:value => params[:ovn_remote_probe_interval],
)
is_expected.to contain_vs_config('external_ids:ovn-openflow-probe-interval').with(
:value => params[:ovn_openflow_probe_interval],
)
end
it 'configures bridge mappings' do