diff --git a/manifests/proxy.pp b/manifests/proxy.pp index 5cecabf9..f776d5af 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -102,6 +102,10 @@ # (optional) Configures node_timeout for swift proxy-server # Defaults to undef. # +# [*recoverable_node_timeout*] +# (optional) Configures recoverable_node_timeout for swift proxy-server +# Defaults to undef. +# # [*enabled*] # (optional) Should the service be enabled. # Defaults to true @@ -175,6 +179,7 @@ class swift::proxy( $write_affinity_node_count = undef, $client_timeout = undef, $node_timeout = undef, + $recoverable_node_timeout = undef, $manage_service = true, $enabled = true, $package_ensure = 'present', @@ -260,6 +265,7 @@ and swift::proxy::s3api instead') 'app:proxy-server/write_affinity': value => $write_affinity; 'app:proxy-server/write_affinity_node_count': value => $write_affinity_node_count; 'app:proxy-server/node_timeout': value => $node_timeout; + 'app:proxy-server/recoverable_node_timeout': value => $recoverable_node_timeout; } if $cors_allow_origin { diff --git a/releasenotes/notes/proxy-recoverable-node-timeout-setting-f2520a2f6ff79433.yaml b/releasenotes/notes/proxy-recoverable-node-timeout-setting-f2520a2f6ff79433.yaml new file mode 100644 index 00000000..5973ea5c --- /dev/null +++ b/releasenotes/notes/proxy-recoverable-node-timeout-setting-f2520a2f6ff79433.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + Adds a new proxy config option to set recoverable_node_timeout. This + setting defaults to node_timeout, which affects HEAD, GET and PUT requests. + However, it makes sense to keep the timeout for GET and HEAD requests + shorter to allow quicker recovery and prevent client timeouts. diff --git a/spec/classes/swift_proxy_spec.rb b/spec/classes/swift_proxy_spec.rb index e5bdca5b..f868c77b 100644 --- a/spec/classes/swift_proxy_spec.rb +++ b/spec/classes/swift_proxy_spec.rb @@ -117,6 +117,7 @@ describe 'swift::proxy' do :write_affinity_node_count => '2 * replicas', :client_timeout => '120', :node_timeout => '20', + :recoverable_node_timeout => '15', :cors_allow_origin => 'http://foo.bar:1234,https://foo.bar', } end @@ -151,6 +152,7 @@ describe 'swift::proxy' do it { should contain_swift_proxy_config('app:proxy-server/write_affinity').with_value('r1') } it { should contain_swift_proxy_config('app:proxy-server/write_affinity_node_count').with_value('2 * replicas') } it { should contain_swift_proxy_config('app:proxy-server/node_timeout').with_value('20') } + it { should contain_swift_proxy_config('app:proxy-server/recoverable_node_timeout').with_value('15') } end describe "when log udp port is set" do @@ -170,6 +172,7 @@ describe 'swift::proxy' do :write_affinity => 'r1', :write_affinity_node_count => '2 * replicas', :node_timeout => '20', + :recoverable_node_timeout => '15', :cors_allow_origin => 'http://foo.bar:1234,https://foo.bar', } end @@ -194,6 +197,7 @@ describe 'swift::proxy' do :write_affinity => 'r1', :write_affinity_node_count => '2 * replicas', :node_timeout => '20', + :recoverable_node_timeout => '15', :cors_allow_origin => 'http://foo.bar:1234,https://foo.bar', } end @@ -231,6 +235,7 @@ describe 'swift::proxy' do it { should contain_swift_proxy_config('app:proxy-server/write_affinity').with_value('r1') } it { should contain_swift_proxy_config('app:proxy-server/write_affinity_node_count').with_value('2 * replicas') } it { should contain_swift_proxy_config('app:proxy-server/node_timeout').with_value('20') } + it { should contain_swift_proxy_config('app:proxy-server/recoverable_node_timeout').with_value('15') } end end