From 7a1851920da7f7491b38308d6303695d381bde8f Mon Sep 17 00:00:00 2001 From: Simeon Gourlin Date: Fri, 8 Nov 2019 15:57:48 +0100 Subject: [PATCH] Add parameter client_timeout This add parameter client_timeout as new parameter for class proxy. Change-Id: Ie0fe6d3b8a3f350c181fd318ba207be14b83b08a --- manifests/proxy.pp | 6 ++++++ .../notes/swift-client-timeout-295562f78eba486b.yaml | 5 +++++ spec/classes/swift_proxy_spec.rb | 2 ++ 3 files changed, 13 insertions(+) create mode 100644 releasenotes/notes/swift-client-timeout-295562f78eba486b.yaml diff --git a/manifests/proxy.pp b/manifests/proxy.pp index c3bb0723..06aba73b 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -86,6 +86,10 @@ # Optional but requires write_affinity to be set. # Defaults to undef. # +# [*client_timeout*] +# (optional) Configures client_timeout for swift proxy-server. +# Defaults to undef. +# # [*node_timeout*] # (optional) Configures node_timeout for swift proxy-server # Defaults to undef. @@ -159,6 +163,7 @@ class swift::proxy( $read_affinity = undef, $write_affinity = undef, $write_affinity_node_count = undef, + $client_timeout = undef, $node_timeout = undef, $manage_service = true, $enabled = true, @@ -222,6 +227,7 @@ class swift::proxy( 'DEFAULT/log_address': value => $log_address; 'DEFAULT/log_udp_host': value => $log_udp_host; 'DEFAULT/log_udp_port': value => $log_udp_port; + 'DEFAULT/client_timeout': value => $client_timeout; 'pipeline:main/pipeline': value => join($pipeline, ' '); 'app:proxy-server/use': value => 'egg:swift#proxy'; 'app:proxy-server/set log_name': value => $log_name; diff --git a/releasenotes/notes/swift-client-timeout-295562f78eba486b.yaml b/releasenotes/notes/swift-client-timeout-295562f78eba486b.yaml new file mode 100644 index 00000000..3237a66d --- /dev/null +++ b/releasenotes/notes/swift-client-timeout-295562f78eba486b.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Added new parameter client_timeout to proxy class that can be used to + configure the timeout to read one chunk from a client. diff --git a/spec/classes/swift_proxy_spec.rb b/spec/classes/swift_proxy_spec.rb index 7c14250f..1f5c3a25 100644 --- a/spec/classes/swift_proxy_spec.rb +++ b/spec/classes/swift_proxy_spec.rb @@ -111,6 +111,7 @@ describe 'swift::proxy' do :read_affinity => 'r1z1=100, r1=200', :write_affinity => 'r1', :write_affinity_node_count => '2 * replicas', + :client_timeout => '120', :node_timeout => '20', :cors_allow_origin => 'http://foo.bar:1234,https://foo.bar', } @@ -127,6 +128,7 @@ describe 'swift::proxy' do it { should contain_swift_proxy_config('DEFAULT/log_address').with_value('/dev/log') } it { should contain_swift_proxy_config('DEFAULT/cors_allow_origin').with_value('http://foo.bar:1234,https://foo.bar') } it { should contain_swift_proxy_config('DEFAULT/strict_cors_mode').with_value('true') } + it { should contain_swift_proxy_config('DEFAULT/client_timeout').with_value('120') } it { should contain_swift_proxy_config('pipeline:main/pipeline').with_value('swauth proxy-server') } it { should contain_swift_proxy_config('app:proxy-server/use').with_value('egg:swift#proxy') } it { should contain_swift_proxy_config('app:proxy-server/set log_name').with_value('swift-proxy-server') }