Browse Source

Add posibilities to set ovn_openflow_probe_interval for controller

Change-Id: I98c7b16c6051e174e515bfa9a81a3fb55267aacf
tags/15.4.0
Kamil Sambor 9 months ago
parent
commit
d1331a6254
3 changed files with 48 additions and 26 deletions
  1. +25
    -16
      manifests/controller.pp
  2. +8
    -0
      releasenotes/notes/ovn_openflow_probe_interval-a465fbbde158c6b0.yaml
  3. +15
    -10
      spec/classes/ovn_controller_spec.rb

+ 25
- 16
manifests/controller.pp View File

@@ -55,19 +55,27 @@
# (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,
$ovn_encap_type = 'geneve',
$ovn_bridge_mappings = [],
$bridge_interface_mappings = [],
$hostname = $::fqdn,
$ovn_bridge = 'br-int',
$enable_hw_offload = false,
$mac_table_size = 50000,
$datapath_type = $::os_service_default,
$enable_dpdk = false,
$ovn_remote_probe_interval = 60000,
$ovn_encap_type = 'geneve',
$ovn_bridge_mappings = [],
$bridge_interface_mappings = [],
$hostname = $::fqdn,
$ovn_bridge = 'br-int',
$enable_hw_offload = false,
$mac_table_size = 50000,
$datapath_type = $::os_service_default,
$enable_dpdk = false,
$ovn_remote_probe_interval = 60000,
$ovn_openflow_probe_interval = 60,
) {

include ::ovn::params
@@ -103,12 +111,13 @@ 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-probe-interval' => { 'value' => "${ovn_remote_probe_interval}" },
'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}" },
'external_ids:ovn-openflow-probe-interval' => { 'value' => "${ovn_openflow_probe_interval}" },
}

if !empty($ovn_bridge_mappings) {


+ 8
- 0
releasenotes/notes/ovn_openflow_probe_interval-a465fbbde158c6b0.yaml 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.

+ 15
- 10
spec/classes/ovn_controller_spec.rb View File

@@ -3,16 +3,17 @@ require 'spec_helper'
describe 'ovn::controller' do

let :params do
{ :ovn_remote => 'tcp:x.x.x.x:5000',
:ovn_encap_type => 'geneve',
:ovn_encap_ip => '1.2.3.4',
:ovn_bridge_mappings => ['physnet-1:br-1'],
:ovn_bridge => 'br-int',
:bridge_interface_mappings => ['br-1:eth1'],
:hostname => 'server1.example.com',
:enable_hw_offload => false,
:mac_table_size => 20000,
:ovn_remote_probe_interval => 30000,
{ :ovn_remote => 'tcp:x.x.x.x:5000',
:ovn_encap_type => 'geneve',
:ovn_encap_ip => '1.2.3.4',
:ovn_bridge_mappings => ['physnet-1:br-1'],
:ovn_bridge => 'br-int',
:bridge_interface_mappings => ['br-1:eth1'],
:hostname => 'server1.example.com',
: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


Loading…
Cancel
Save