From c3c0dd2b151b35f90a4414d65a989e671e7abb2c Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Wed, 5 Feb 2020 11:32:17 +0100 Subject: [PATCH] Add OVS of_inactivity_probe parameter This adds the of_inactivity_probe parameter for the OVS agent. [1] [1] https://github.com/openstack/neutron/blob/master/neutron/conf/plugins/ml2/drivers/ovs_conf.py#L125 Change-Id: I35778278f2f928f8c01f7719c9877e1e8ac89fa1 (cherry picked from commit 32bde05d8aa0601ecd0708cee565b2dc4144d821) (cherry picked from commit 840e1f22ab0e59b30eda6c496b03ccaf13ae2bbd) (cherry picked from commit 5bffbeb9978eb7970b9d9768840b77434fff9819) --- manifests/agents/ml2/ovs.pp | 7 +++++++ .../add-ovs-of_inactivity_probe-c91580cef1954de4.yaml | 4 ++++ spec/classes/neutron_agents_ml2_ovs_spec.rb | 11 +++++++++++ 3 files changed, 22 insertions(+) create mode 100644 releasenotes/notes/add-ovs-of_inactivity_probe-c91580cef1954de4.yaml diff --git a/manifests/agents/ml2/ovs.pp b/manifests/agents/ml2/ovs.pp index 84a10809d..3eda0cf5b 100644 --- a/manifests/agents/ml2/ovs.pp +++ b/manifests/agents/ml2/ovs.pp @@ -46,6 +46,11 @@ # (Optional) The timeout in seconds for OVSDB commands. # Defaults to $::os_service_default # +# [*of_inactivity_probe*] +# (Optional) The inactivity_probe interval in second for the local switch +# connnection to the controller. A value of 0 disables inactivity probes. +# Defaults to $::os_service_default +# # [*integration_bridge*] # (optional) Integration bridge in OVS # Defaults to 'br-int' @@ -172,6 +177,7 @@ class neutron::agents::ml2::ovs ( $bridge_uplinks = [], $bridge_mappings = [], $ovsdb_timeout = $::os_service_default, + $of_inactivity_probe = $::os_service_default, $integration_bridge = 'br-int', $tunnel_types = [], $local_ip = false, @@ -297,6 +303,7 @@ class neutron::agents::ml2::ovs ( 'agent/minimize_polling': value => $minimize_polling; 'agent/tunnel_csum': value => $tunnel_csum; 'ovs/ovsdb_timeout': value => $ovsdb_timeout; + 'ovs/of_inactivity_probe': value => $of_inactivity_probe; 'ovs/integration_bridge': value => $integration_bridge; 'ovs/datapath_type': value => $datapath_type; 'ovs/vhostuser_socket_dir': value => $vhostuser_socket_dir; diff --git a/releasenotes/notes/add-ovs-of_inactivity_probe-c91580cef1954de4.yaml b/releasenotes/notes/add-ovs-of_inactivity_probe-c91580cef1954de4.yaml new file mode 100644 index 000000000..92e1433a8 --- /dev/null +++ b/releasenotes/notes/add-ovs-of_inactivity_probe-c91580cef1954de4.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Added new parameter neutron::agents::ml2::ovs::of_inactivity_probe. diff --git a/spec/classes/neutron_agents_ml2_ovs_spec.rb b/spec/classes/neutron_agents_ml2_ovs_spec.rb index 23b2d5226..529f56d18 100644 --- a/spec/classes/neutron_agents_ml2_ovs_spec.rb +++ b/spec/classes/neutron_agents_ml2_ovs_spec.rb @@ -51,6 +51,7 @@ describe 'neutron::agents::ml2::ovs' do is_expected.to contain_neutron_agent_ovs('ovs/vhostuser_socket_dir').with_value(['']) is_expected.to contain_neutron_agent_ovs('ovs/ovsdb_interface').with_value(['']) should contain_neutron_agent_ovs('ovs/ovsdb_timeout').with_value('') + should contain_neutron_agent_ovs('ovs/of_inactivity_probe').with_value('') is_expected.to contain_neutron_agent_ovs('ovs/integration_bridge').with_value(p[:integration_bridge]) is_expected.to contain_neutron_agent_ovs('securitygroup/firewall_driver').\ with_value(p[:firewall_driver]) @@ -204,6 +205,16 @@ describe 'neutron::agents::ml2::ovs' do end end + context 'when setting of_inactivity_probe' do + before :each do + params.merge!( :of_inactivity_probe => 20 ) + end + + it 'configures of_inactivity_probe' do + should contain_neutron_agent_ovs('ovs/of_inactivity_probe').with_value(params[:of_inactivity_probe]) + end + end + context 'when supplying extensions for ML2 plugin' do before :each do params.merge!(:extensions => ['qos'])