From 7d1956eadcfabd1b28dba40b8659956463d5b767 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 22 Aug 2022 16:25:14 +0900 Subject: [PATCH] Do not hard-code default of [swift-constraints] max_header_size ... and use the service default instead, to avoid additional effort to maintain consistent default. This also removes the recommendation described in the parameter description which is not present in Swift documentation. Change-Id: I5a42240dd8d5b278e2b575d37ba2e62c42ae53e0 --- manifests/init.pp | 6 +++--- spec/classes/swift_spec.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index c904ecb3..20d817b1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -29,8 +29,8 @@ # # [*max_header_size*] # (Optional) Max HTTP header size for incoming requests for all swift -# services. Recommended size is 32768 for PKI keystone tokens. -# Defaults to 8192 +# services. +# Defaults to $::os_service_default # # == Dependencies # @@ -48,7 +48,7 @@ class swift( $swift_hash_path_suffix = $::os_service_default, $swift_hash_path_prefix = $::os_service_default, $package_ensure = 'present', - $max_header_size = 8192, + $max_header_size = $::os_service_default, ) { include swift::deps diff --git a/spec/classes/swift_spec.rb b/spec/classes/swift_spec.rb index 15510d9d..db63bc6b 100644 --- a/spec/classes/swift_spec.rb +++ b/spec/classes/swift_spec.rb @@ -25,7 +25,7 @@ describe 'swift' do is_expected.to contain_swift_config( 'swift-hash/swift_hash_path_prefix').with_value('') is_expected.to contain_swift_config( - 'swift-constraints/max_header_size').with_value(8192) + 'swift-constraints/max_header_size').with_value('') end it { @@ -47,12 +47,12 @@ describe 'swift' do context 'with max_header_size' do before do - params.merge!({:max_header_size => 16384}) + params.merge!({:max_header_size => 8192}) end it 'should configure swift.conf' do is_expected.to contain_swift_config( - 'swift-constraints/max_header_size').with_value(16384) + 'swift-constraints/max_header_size').with_value(8192) end end