From 96fa23758dfcd4cf7379bf1b229fd392c9c24bd7 Mon Sep 17 00:00:00 2001 From: Carlos Goncalves Date: Tue, 17 Sep 2019 14:57:50 +0200 Subject: [PATCH] Add build_active_retries and port_detach_timeout Parameter build_active_retries sets retry threshold for waiting for a build slot for an amphorae. Parameter port_detach_timeout sets seconds to wait for a port to detach from an amphora Change-Id: I5e2d2db8e7113e0c50b7cbd6a7ed383492477180 --- manifests/controller.pp | 12 ++++++++++++ ...t-detach-timeout-parameters-5dc21de1a97699ef.yaml | 3 +++ spec/classes/octavia_controller_spec.rb | 8 +++++++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/add-build-active-retries-and-port-detach-timeout-parameters-5dc21de1a97699ef.yaml diff --git a/manifests/controller.pp b/manifests/controller.pp index e80d6eb0..b58d8d06 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -78,6 +78,14 @@ # (optional) Number of seconds to wait between connection attempts to amphora. # Defaults to $::os_service_default # +# [*build_active_retries*] +# (optional) Retry threshold for waiting for a build slot for an amphorae. +# Defaults to $::os_service_default +# +# [*port_detach_timeout*] +# (optional) Seconds to wait for a port to detach from an amphora. +# Defaults to $::os_service_default +# class octavia::controller ( $amp_flavor_id = '65', $amp_image_tag = $::os_service_default, @@ -96,6 +104,8 @@ class octavia::controller ( $controller_ip_port_list = $::os_service_default, $connection_max_retries = $::os_service_default, $connection_retry_interval = $::os_service_default, + $build_active_retries = $::os_service_default, + $port_detach_timeout = $::os_service_default, ) inherits octavia::params { include ::octavia::deps @@ -145,5 +155,7 @@ class octavia::controller ( 'health_manager/controller_ip_port_list' : value => $controller_ip_port_list; 'haproxy_amphora/connection_max_retries' : value => $connection_max_retries; 'haproxy_amphora/connection_retry_interval' : value => $connection_retry_interval; + 'haproxy_amphora/build_active_retries' : value => $build_active_retries; + 'networking/port_detach_timeout' : value => $port_detach_timeout; } } diff --git a/releasenotes/notes/add-build-active-retries-and-port-detach-timeout-parameters-5dc21de1a97699ef.yaml b/releasenotes/notes/add-build-active-retries-and-port-detach-timeout-parameters-5dc21de1a97699ef.yaml new file mode 100644 index 00000000..57b7fbea --- /dev/null +++ b/releasenotes/notes/add-build-active-retries-and-port-detach-timeout-parameters-5dc21de1a97699ef.yaml @@ -0,0 +1,3 @@ +--- +features: + - Added build_active_retries and port_detach_timeout parameters. diff --git a/spec/classes/octavia_controller_spec.rb b/spec/classes/octavia_controller_spec.rb index bc0b1aef..e32d57dc 100644 --- a/spec/classes/octavia_controller_spec.rb +++ b/spec/classes/octavia_controller_spec.rb @@ -21,7 +21,9 @@ describe 'octavia::controller' do :amp_ssh_key_name => 'custom-amphora-key', :controller_ip_port_list => '1.2.3.4:5555,4.3.2.1:5555', :connection_max_retries => 240, - :connection_retry_interval => 10 + :connection_retry_interval => 10, + :build_active_retries => 5, + :port_detach_timeout => 15 } end @@ -34,6 +36,8 @@ describe 'octavia::controller' do it { is_expected.to contain_octavia_config('health_manager/controller_ip_port_list').with_value('1.2.3.4:5555,4.3.2.1:5555') } it { is_expected.to contain_octavia_config('haproxy_amphora/connection_max_retries').with_value(240) } it { is_expected.to contain_octavia_config('haproxy_amphora/connection_retry_interval').with_value(10) } + it { is_expected.to contain_octavia_config('haproxy_amphora/build_active_retries').with_value(5) } + it { is_expected.to contain_octavia_config('networking/port_detach_timeout').with_value(15) } end it 'configures worker parameters' do @@ -48,6 +52,8 @@ describe 'octavia::controller' do is_expected.to contain_octavia_config('haproxy_amphora/timeout_tcp_inspect').with_value('') is_expected.to contain_octavia_config('haproxy_amphora/connection_max_retries').with_value('') is_expected.to contain_octavia_config('haproxy_amphora/connection_retry_interval').with_value('') + is_expected.to contain_octavia_config('haproxy_amphora/build_active_retries').with_value('') + is_expected.to contain_octavia_config('networking/port_detach_timeout').with_value('') end context 'with ssh key access disabled' do