Add support for allow_open_expired
Depends-on: https://review.opendev.org/874710 Change-Id: Ie3603dd6fe7403c4268070049202b5cc4592c3f9
This commit is contained in:
parent
e0cb20b506
commit
845404bd05
@ -107,6 +107,11 @@
|
||||
# (optional) Configures recoverable_node_timeout for swift proxy-server
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*allow_open_expired*]
|
||||
# (optional) Allow access to an object that has expired but not yet been
|
||||
# reaped, by setting the x-open-expired header.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*enabled*]
|
||||
# (optional) Should the service be enabled.
|
||||
# Defaults to true
|
||||
@ -184,6 +189,7 @@ class swift::proxy(
|
||||
$keepalive_timeout = $facts['os_service_default'],
|
||||
$node_timeout = $facts['os_service_default'],
|
||||
$recoverable_node_timeout = $facts['os_service_default'],
|
||||
$allow_open_expired = $facts['os_service_default'],
|
||||
Boolean $manage_service = true,
|
||||
Boolean $enabled = true,
|
||||
$package_ensure = 'present',
|
||||
@ -264,6 +270,7 @@ class swift::proxy(
|
||||
'app:proxy-server/max_containers_whitelist': value => $max_containers_whitelist;
|
||||
'app:proxy-server/node_timeout': value => $node_timeout;
|
||||
'app:proxy-server/recoverable_node_timeout': value => $recoverable_node_timeout;
|
||||
'app:proxy-server/allow_open_expired': value => $allow_open_expired;
|
||||
}
|
||||
|
||||
swift_proxy_config {
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``swift::proxy::allow_open_expired`` parameter has been added.
|
@ -87,6 +87,7 @@ describe 'swift::proxy' do
|
||||
it { should contain_swift_proxy_config('app:proxy-server/write_affinity_node_count').with_value('<SERVICE DEFAULT>') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/node_timeout').with_value('<SERVICE DEFAULT>') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/recoverable_node_timeout').with_value('<SERVICE DEFAULT>') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/allow_open_expired').with_value('<SERVICE DEFAULT>') }
|
||||
it { should contain_swift_proxy_config('DEFAULT/cors_allow_origin').with_value('<SERVICE DEFAULT>') }
|
||||
it { should contain_swift_proxy_config('DEFAULT/strict_cors_mode').with_value('<SERVICE DEFAULT>') }
|
||||
|
||||
@ -149,6 +150,7 @@ describe 'swift::proxy' do
|
||||
:keepalive_timeout => '121',
|
||||
:node_timeout => '20',
|
||||
:recoverable_node_timeout => '15',
|
||||
:allow_open_expired => false,
|
||||
:cors_allow_origin => ['http://foo.bar:1234', 'https://foo.bar'],
|
||||
:strict_cors_mode => true
|
||||
}
|
||||
@ -184,6 +186,7 @@ describe 'swift::proxy' do
|
||||
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') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/allow_open_expired').with_value(false) }
|
||||
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') }
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user