Add support for allow_open_expired
Depends-on: https://review.opendev.org/874710 Change-Id: Ie3603dd6fe7403c4268070049202b5cc4592c3f9
This commit is contained in:
@@ -107,6 +107,11 @@
|
|||||||
# (optional) Configures recoverable_node_timeout for swift proxy-server
|
# (optional) Configures recoverable_node_timeout for swift proxy-server
|
||||||
# Defaults to $facts['os_service_default'].
|
# 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*]
|
# [*enabled*]
|
||||||
# (optional) Should the service be enabled.
|
# (optional) Should the service be enabled.
|
||||||
# Defaults to true
|
# Defaults to true
|
||||||
@@ -184,6 +189,7 @@ class swift::proxy(
|
|||||||
$keepalive_timeout = $facts['os_service_default'],
|
$keepalive_timeout = $facts['os_service_default'],
|
||||||
$node_timeout = $facts['os_service_default'],
|
$node_timeout = $facts['os_service_default'],
|
||||||
$recoverable_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 $manage_service = true,
|
||||||
Boolean $enabled = true,
|
Boolean $enabled = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
@@ -264,6 +270,7 @@ class swift::proxy(
|
|||||||
'app:proxy-server/max_containers_whitelist': value => $max_containers_whitelist;
|
'app:proxy-server/max_containers_whitelist': value => $max_containers_whitelist;
|
||||||
'app:proxy-server/node_timeout': value => $node_timeout;
|
'app:proxy-server/node_timeout': value => $node_timeout;
|
||||||
'app:proxy-server/recoverable_node_timeout': value => $recoverable_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 {
|
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/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/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/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/cors_allow_origin').with_value('<SERVICE DEFAULT>') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/strict_cors_mode').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',
|
:keepalive_timeout => '121',
|
||||||
:node_timeout => '20',
|
:node_timeout => '20',
|
||||||
:recoverable_node_timeout => '15',
|
:recoverable_node_timeout => '15',
|
||||||
|
:allow_open_expired => false,
|
||||||
:cors_allow_origin => ['http://foo.bar:1234', 'https://foo.bar'],
|
:cors_allow_origin => ['http://foo.bar:1234', 'https://foo.bar'],
|
||||||
:strict_cors_mode => true
|
: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/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/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/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/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/strict_cors_mode').with_value('true') }
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user