From 2ac18b105046d3bdcf524119a14751df4e9116c8 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 26 May 2022 11:47:38 +0900 Subject: [PATCH] Support [amphora_agent] agent_request_read_timeout Change-Id: I0056d81ed88f0815019fe0e9671e0a3a2b78dbb2 --- manifests/controller.pp | 7 +++++++ .../notes/agent_request_read_timeout-66a1de2c273fd4c8.yaml | 6 ++++++ spec/classes/octavia_controller_spec.rb | 3 +++ 3 files changed, 16 insertions(+) create mode 100644 releasenotes/notes/agent_request_read_timeout-66a1de2c273fd4c8.yaml diff --git a/manifests/controller.pp b/manifests/controller.pp index c0c23cbe..9091ebc7 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -141,6 +141,11 @@ # (optional) Default connection_limit for listeners. # Defaults to $::os_service_default # +# [*agent_request_read_timeout*] +# (optional) The time in seconds to allow a request from the controller to +# run before terminating the socket. +# Defaults to $::os_service_default +# # [*admin_log_targets*] # (optional) The list of syslog endpoints, host:port comma separated list, # to receive administrative log messages. @@ -238,6 +243,7 @@ class octavia::controller ( $build_active_retries = $::os_service_default, $build_retry_interval = $::os_service_default, $default_connection_limit = $::os_service_default, + $agent_request_read_timeout = $::os_service_default, $admin_log_targets = $::os_service_default, $administrative_log_facility = $::os_service_default, $forward_all_logs = $::os_service_default, @@ -306,6 +312,7 @@ Use the octavia::networking class instead') 'haproxy_amphora/build_active_retries' : value => $build_active_retries; 'haproxy_amphora/build_retry_interval' : value => $build_retry_interval; 'haproxy_amphora/default_connection_limit' : value => $default_connection_limit; + 'amphora_agent/agent_request_read_timeout' : value => $agent_request_read_timeout; 'amphora_agent/admin_log_targets' : value => join(any2array($admin_log_targets), ','); 'amphora_agent/administrative_log_facility' : value => $administrative_log_facility; 'amphora_agent/forward_all_logs' : value => $forward_all_logs; diff --git a/releasenotes/notes/agent_request_read_timeout-66a1de2c273fd4c8.yaml b/releasenotes/notes/agent_request_read_timeout-66a1de2c273fd4c8.yaml new file mode 100644 index 00000000..d4b639fa --- /dev/null +++ b/releasenotes/notes/agent_request_read_timeout-66a1de2c273fd4c8.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The new ``octavia::controller::agent_read_timeout`` parameter has been + added. This paraemeter controls the ``[amphora_agent] agent_read_timeout`` + option in octavia.conf. diff --git a/spec/classes/octavia_controller_spec.rb b/spec/classes/octavia_controller_spec.rb index f48e1bda..03b35408 100644 --- a/spec/classes/octavia_controller_spec.rb +++ b/spec/classes/octavia_controller_spec.rb @@ -43,6 +43,7 @@ describe 'octavia::controller' do :build_retry_interval => 5, :default_connection_limit => 50000, :port_detach_timeout => 15, + :agent_request_read_timeout => 180, :admin_log_targets => ['192.0.2.1:10514', '2001:db8:1::10:10514'], :administrative_log_facility => 2, :forward_all_logs => true, @@ -90,6 +91,7 @@ describe 'octavia::controller' do is_expected.to contain_octavia_config('haproxy_amphora/build_retry_interval').with_value(5) is_expected.to contain_octavia_config('haproxy_amphora/default_connection_limit').with_value(50000) is_expected.to contain_octavia_config('networking/port_detach_timeout').with_value(15) + is_expected.to contain_octavia_config('amphora_agent/agent_request_read_timeout').with_value(180) is_expected.to contain_octavia_config('amphora_agent/admin_log_targets').with_value('192.0.2.1:10514,2001:db8:1::10:10514') is_expected.to contain_octavia_config('amphora_agent/administrative_log_facility').with_value(2) is_expected.to contain_octavia_config('amphora_agent/forward_all_logs').with_value(true) @@ -138,6 +140,7 @@ describe 'octavia::controller' do is_expected.to contain_octavia_config('haproxy_amphora/build_retry_interval').with_value('') is_expected.to contain_octavia_config('haproxy_amphora/default_connection_limit').with_value('') is_expected.to contain_octavia_config('networking/port_detach_timeout').with_value('') + is_expected.to contain_octavia_config('amphora_agent/agent_request_read_timeout').with_value('') is_expected.to contain_octavia_config('amphora_agent/admin_log_targets').with_value('') is_expected.to contain_octavia_config('amphora_agent/administrative_log_facility').with_value('') is_expected.to contain_octavia_config('amphora_agent/forward_all_logs').with_value('')