From 7a0c615db8a37cec64ceda96909a0743c9ac9161 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Wed, 25 Mar 2015 13:53:50 -0400 Subject: [PATCH] Add node_timeout parameter for proxy-server.conf This commit allows to configure the node_timeout parameter of proxy-server.conf proxy-server middleware in the pipeline. Change-Id: Idbac35336a5b266f6de288a28243f91ee4d67afd --- manifests/proxy.pp | 5 +++++ spec/classes/swift_proxy_spec.rb | 4 +++- templates/proxy-server.conf.erb | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/manifests/proxy.pp b/manifests/proxy.pp index d89fea92..717cdede 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -50,6 +50,10 @@ # Optional but requires write_affinity to be set. # Defaults to undef. # +# [*node_timeout*] +# (optional) Configures node_timeout for swift proxy-server +# Defaults to undef. +# # [*enabled*] # (optional) Should the service be enabled. # Defaults to true @@ -94,6 +98,7 @@ class swift::proxy( $read_affinity = undef, $write_affinity = undef, $write_affinity_node_count = undef, + $node_timeout = undef, $manage_service = true, $enabled = true, $package_ensure = 'present' diff --git a/spec/classes/swift_proxy_spec.rb b/spec/classes/swift_proxy_spec.rb index 8ff19283..83705045 100644 --- a/spec/classes/swift_proxy_spec.rb +++ b/spec/classes/swift_proxy_spec.rb @@ -102,6 +102,7 @@ describe 'swift::proxy' do :read_affinity => 'r1z1=100, r1=200', :write_affinity => 'r1', :write_affinity_node_count => '2 * replicas', + :node_timeout => '20', } end it 'should build the header file with provided values' do @@ -121,7 +122,8 @@ describe 'swift::proxy' do 'account_autocreate = false', 'read_affinity = r1z1=100, r1=200', 'write_affinity = r1', - 'write_affinity_node_count = 2 * replicas' + 'write_affinity_node_count = 2 * replicas', + 'node_timeout = 20' ] ) end diff --git a/templates/proxy-server.conf.erb b/templates/proxy-server.conf.erb index d59cb22e..1a798738 100644 --- a/templates/proxy-server.conf.erb +++ b/templates/proxy-server.conf.erb @@ -41,3 +41,6 @@ write_affinity = <%= @write_affinity -%> <% if @write_affinity_node_count -%> write_affinity_node_count = <%= @write_affinity_node_count -%> <% end %> +<% if @node_timeout -%> +node_timeout = <%= @node_timeout -%> +<% end %>