diff --git a/manifests/agents/ml2/ovs.pp b/manifests/agents/ml2/ovs.pp index 3eda0cf5b..7e4dc4155 100644 --- a/manifests/agents/ml2/ovs.pp +++ b/manifests/agents/ml2/ovs.pp @@ -46,6 +46,15 @@ # (Optional) The timeout in seconds for OVSDB commands. # 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*] # (Optional) The inactivity_probe interval in second for the local switch # connnection to the controller. A value of 0 disables inactivity probes. @@ -177,6 +186,8 @@ class neutron::agents::ml2::ovs ( $bridge_uplinks = [], $bridge_mappings = [], $ovsdb_timeout = $::os_service_default, + $of_connect_timeout = $::os_service_default, + $of_request_timeout = $::os_service_default, $of_inactivity_probe = $::os_service_default, $integration_bridge = 'br-int', $tunnel_types = [], @@ -303,6 +314,8 @@ 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_connect_timeout': value => $of_connect_timeout; + 'ovs/of_request_timeout': value => $of_request_timeout; 'ovs/of_inactivity_probe': value => $of_inactivity_probe; 'ovs/integration_bridge': value => $integration_bridge; 'ovs/datapath_type': value => $datapath_type; diff --git a/releasenotes/notes/add-ovs-of-timeouts-51c5abf0026572a5.yaml b/releasenotes/notes/add-ovs-of-timeouts-51c5abf0026572a5.yaml new file mode 100644 index 000000000..4f9902220 --- /dev/null +++ b/releasenotes/notes/add-ovs-of-timeouts-51c5abf0026572a5.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Added new parameters of_connect_timeout and of_request_timeout in the + neutron::agents::ml2::ovs class. diff --git a/spec/classes/neutron_agents_ml2_ovs_spec.rb b/spec/classes/neutron_agents_ml2_ovs_spec.rb index 529f56d18..dafa3b04d 100644 --- a/spec/classes/neutron_agents_ml2_ovs_spec.rb +++ b/spec/classes/neutron_agents_ml2_ovs_spec.rb @@ -51,6 +51,8 @@ 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_connect_timeout').with_value('') + should contain_neutron_agent_ovs('ovs/of_request_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').\ @@ -205,6 +207,21 @@ describe 'neutron::agents::ml2::ovs' do 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 before :each do params.merge!( :of_inactivity_probe => 20 )