Add the ability to configure ovn-remote-probe-interval

This parameter sets inactive probe interval of the JSON
session from ovn-controller to the OVN SB database.
By default this it is 5s which not be sufficient in
loaded systems or during high control-plane activity spikes,
leading to unnecessary reconnections to OVSDB server.
Now it is extended by default to 1 min and it
is configurable.

Change-Id: If8684927b17fc9f7ee4cca277b8b0ca9c4d8b5e1
Partial-Bug: #1836604
(cherry picked from commit 2d401a869f)
This commit is contained in:
Kamil Sambor 2019-07-15 17:15:26 +02:00
parent c236c46b46
commit f68e399cf1
3 changed files with 26 additions and 6 deletions

View File

@ -42,6 +42,11 @@
# [*mac_table_size*]
# Set the mac table size for the provider bridges if defined in ovn_bridge_mappings
# Defaults to 50000
#
# [*ovn_remote_probe_interval*]
# (optional) Set probe interval, based on user configuration, value is in ms
# Defaults to 60000
#
class ovn::controller(
$ovn_remote,
@ -53,6 +58,7 @@ class ovn::controller(
$ovn_bridge = 'br-int',
$enable_hw_offload = false,
$mac_table_size = 50000,
$ovn_remote_probe_interval = 60000,
) {
include ::ovn::params
include ::vswitch::ovs
@ -77,11 +83,12 @@ class ovn::controller(
}
$config_items = {
'external_ids:ovn-remote' => { 'value' => $ovn_remote },
'external_ids:ovn-encap-type' => { 'value' => $ovn_encap_type },
'external_ids:ovn-encap-ip' => { 'value' => $ovn_encap_ip },
'external_ids:hostname' => { 'value' => $hostname },
'external_ids:ovn-bridge' => { 'value' => $ovn_bridge },
'external_ids:ovn-remote' => { 'value' => $ovn_remote },
'external_ids:ovn-encap-type' => { 'value' => $ovn_encap_type },
'external_ids:ovn-encap-ip' => { 'value' => $ovn_encap_ip },
'external_ids:hostname' => { 'value' => $hostname },
'external_ids:ovn-bridge' => { 'value' => $ovn_bridge },
'external_ids:ovn-remote-probe-interval' => { 'value' => "${ovn_remote_probe_interval}" },
}
if !empty($ovn_bridge_mappings) {

View File

@ -0,0 +1,8 @@
---
features:
- |
This parameter sets inactive probe interval of the JSON session
from ovn-controller to the OVN SB database. By default this it
is 5s which not be sufficient in loaded systems or during high
control-plane activity spikes, leading to unnecessary reconnections
to OVSDB server. Now it is extended by default to 1 min and it is configurable.

View File

@ -11,7 +11,8 @@ describe 'ovn::controller' do
:bridge_interface_mappings => ['br-1:eth1'],
:hostname => 'server1.example.com',
:enable_hw_offload => false,
:mac_table_size => 20000
:mac_table_size => 20000,
:ovn_remote_probe_interval => 30000,
}
end
@ -62,6 +63,10 @@ describe 'ovn::controller' do
is_expected.to contain_vs_config('external_ids:ovn-bridge').with(
:value => params[:ovn_bridge],
)
is_expected.to contain_vs_config('external_ids:ovn-remote-probe-interval').with(
:value => params[:ovn_remote_probe_interval],
)
end
it 'configures bridge mappings' do