Add of_connect_timeout and of_request_timeout

Adds these two new parameters. [1]

[1] https://github.com/openstack/neutron/blob/master/neutron/conf/plugins/ml2/drivers/ovs_conf.py#L119

Change-Id: I0cf45085c6d9f278fffb6f55ea8d2159dd425746
(cherry picked from commit 95f442bd61)
(cherry picked from commit fb512e192b)
(cherry picked from commit d7bdf94e46)
This commit is contained in:
Tobias Urdin 2020-02-05 11:37:13 +01:00
parent c3c0dd2b15
commit 30913d8537
3 changed files with 35 additions and 0 deletions

View File

@ -46,6 +46,15 @@
# (Optional) The timeout in seconds for OVSDB commands. # (Optional) The timeout in seconds for OVSDB commands.
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*of_connect_timeout*]
# (Optional) Timeout in seconds to wait for the local switch
# connecting to the controller.
# Defaults to $::os_service_default
#
# [*of_request_timeout*]
# (Optional) Timeout in seconds to wait for a single OpenFlow request.
# Defaults to $::os_service_default
#
# [*of_inactivity_probe*] # [*of_inactivity_probe*]
# (Optional) The inactivity_probe interval in second for the local switch # (Optional) The inactivity_probe interval in second for the local switch
# connnection to the controller. A value of 0 disables inactivity probes. # connnection to the controller. A value of 0 disables inactivity probes.
@ -177,6 +186,8 @@ class neutron::agents::ml2::ovs (
$bridge_uplinks = [], $bridge_uplinks = [],
$bridge_mappings = [], $bridge_mappings = [],
$ovsdb_timeout = $::os_service_default, $ovsdb_timeout = $::os_service_default,
$of_connect_timeout = $::os_service_default,
$of_request_timeout = $::os_service_default,
$of_inactivity_probe = $::os_service_default, $of_inactivity_probe = $::os_service_default,
$integration_bridge = 'br-int', $integration_bridge = 'br-int',
$tunnel_types = [], $tunnel_types = [],
@ -303,6 +314,8 @@ class neutron::agents::ml2::ovs (
'agent/minimize_polling': value => $minimize_polling; 'agent/minimize_polling': value => $minimize_polling;
'agent/tunnel_csum': value => $tunnel_csum; 'agent/tunnel_csum': value => $tunnel_csum;
'ovs/ovsdb_timeout': value => $ovsdb_timeout; 'ovs/ovsdb_timeout': value => $ovsdb_timeout;
'ovs/of_connect_timeout': value => $of_connect_timeout;
'ovs/of_request_timeout': value => $of_request_timeout;
'ovs/of_inactivity_probe': value => $of_inactivity_probe; 'ovs/of_inactivity_probe': value => $of_inactivity_probe;
'ovs/integration_bridge': value => $integration_bridge; 'ovs/integration_bridge': value => $integration_bridge;
'ovs/datapath_type': value => $datapath_type; 'ovs/datapath_type': value => $datapath_type;

View File

@ -0,0 +1,5 @@
---
features:
- |
Added new parameters of_connect_timeout and of_request_timeout in the
neutron::agents::ml2::ovs class.

View File

@ -51,6 +51,8 @@ describe 'neutron::agents::ml2::ovs' do
is_expected.to contain_neutron_agent_ovs('ovs/vhostuser_socket_dir').with_value(['<SERVICE DEFAULT>']) is_expected.to contain_neutron_agent_ovs('ovs/vhostuser_socket_dir').with_value(['<SERVICE DEFAULT>'])
is_expected.to contain_neutron_agent_ovs('ovs/ovsdb_interface').with_value(['<SERVICE DEFAULT>']) is_expected.to contain_neutron_agent_ovs('ovs/ovsdb_interface').with_value(['<SERVICE DEFAULT>'])
should contain_neutron_agent_ovs('ovs/ovsdb_timeout').with_value('<SERVICE DEFAULT>') should contain_neutron_agent_ovs('ovs/ovsdb_timeout').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('ovs/of_connect_timeout').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('ovs/of_request_timeout').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('ovs/of_inactivity_probe').with_value('<SERVICE DEFAULT>') should contain_neutron_agent_ovs('ovs/of_inactivity_probe').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_agent_ovs('ovs/integration_bridge').with_value(p[:integration_bridge]) 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').\ is_expected.to contain_neutron_agent_ovs('securitygroup/firewall_driver').\
@ -205,6 +207,21 @@ describe 'neutron::agents::ml2::ovs' do
end end
end end
context 'when setting of_connect_timeout and of_request_timeout' do
before :each do
params.merge!( :of_connect_timeout => 30,
:of_request_timeout => 20 )
end
it 'configures of_connect_timeout' do
should contain_neutron_agent_ovs('ovs/of_connect_timeout').with_value(params[:of_connect_timeout])
end
it 'configures of_request_timeout' do
should contain_neutron_agent_ovs('ovs/of_request_timeout').with_value(params[:of_request_timeout])
end
end
context 'when setting of_inactivity_probe' do context 'when setting of_inactivity_probe' do
before :each do before :each do
params.merge!( :of_inactivity_probe => 20 ) params.merge!( :of_inactivity_probe => 20 )