Переглянути джерело

Add posibilities to set ovn_openflow_probe_interval for controller

Change-Id: I98c7b16c6051e174e515bfa9a81a3fb55267aacf
(cherry picked from commit d1331a6254)
(cherry picked from commit a5b784df19)
changes/33/690033/2
Kamil Sambor 6 місяці тому
джерело
коміт
41c885cf4c
3 змінених файлів з 46 додано та 25 видалено
  1. +23
    -15
      manifests/controller.pp
  2. +8
    -0
      releasenotes/notes/ovn_openflow_probe_interval-a465fbbde158c6b0.yaml
  3. +15
    -10
      spec/classes/ovn_controller_spec.rb

+ 23
- 15
manifests/controller.pp Переглянути файл

@@ -47,18 +47,25 @@
# (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,
$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,
$ovn_remote_probe_interval = 60000,
$ovn_openflow_probe_interval = 60,
) {
include ::ovn::params
include ::vswitch::ovs
@@ -83,12 +90,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 Переглянути файл

@@ -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 Переглянути файл

@@ -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


Завантаження…
Відмінити
Зберегти