Deprecate the ineffective min_segment_size parameter
The [filter:slo] min_segment_size parameter was already removed from swift[1]. This change deprecate the corresponding parameter so that we can remove it in a future release. Change-Id: Ibe4c1233a48ee38d3bd7649479e15bb29f03ed8b
This commit is contained in:
parent
ef9ff55131
commit
0ef85fafbb
|
@ -15,10 +15,6 @@
|
|||
# (Optional) Max manifest size.
|
||||
# Defaults to 2097152.
|
||||
#
|
||||
# [*min_segment_size*]
|
||||
# (Optional) minimal segment size
|
||||
# Defaults to 1048576.
|
||||
#
|
||||
# [*rate_limit_under_size*]
|
||||
# (Optional) Rate limiting applies only to segments smaller than this size.
|
||||
# Defaults to $::os_service_default.
|
||||
|
@ -31,7 +27,7 @@
|
|||
# [*rate_limit_segments_per_sec*]
|
||||
# (Optional) Once segment rate-limiting kicks in for an object, limit segments
|
||||
# served to N per second. 0 means no rate-limiting.
|
||||
# Defaults to 0.
|
||||
# Defaults to 1.
|
||||
#
|
||||
# [*max_get_time*]
|
||||
# (Optional) Time limit on GET requests (seconds).
|
||||
|
@ -57,6 +53,12 @@
|
|||
# of segments using query params like `?multipart-manifest=delete&async=on`.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*min_segment_size*]
|
||||
# (Optional) minimal segment size
|
||||
# Defaults to undef.
|
||||
#
|
||||
# == Authors
|
||||
#
|
||||
# Xingchao Yu yuxcer@gmail.com
|
||||
|
@ -68,24 +70,31 @@
|
|||
class swift::proxy::slo (
|
||||
$max_manifest_segments = '1000',
|
||||
$max_manifest_size = '2097152',
|
||||
$min_segment_size = '1048576',
|
||||
$rate_limit_under_size = $::os_service_default,
|
||||
$rate_limit_after_segment = '10',
|
||||
$rate_limit_segments_per_sec = '0',
|
||||
$rate_limit_segments_per_sec = '1',
|
||||
$max_get_time = '86400',
|
||||
$concurrency = $::os_service_default,
|
||||
$delete_concurrency = $::os_service_default,
|
||||
$yield_frequency = $::os_service_default,
|
||||
$allow_async_delete = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$min_segment_size = undef,
|
||||
) {
|
||||
|
||||
include swift::deps
|
||||
|
||||
if $min_segment_size != undef {
|
||||
warning('The swift::proxy::slo::min_segment_size parameter is deprecated and has no effect.')
|
||||
}
|
||||
swift_proxy_config {
|
||||
'filter:slo/min_segment_size': ensure => absent;
|
||||
}
|
||||
|
||||
swift_proxy_config {
|
||||
'filter:slo/use': value => 'egg:swift#slo';
|
||||
'filter:slo/max_manifest_segments': value => $max_manifest_segments;
|
||||
'filter:slo/max_manifest_size': value => $max_manifest_size;
|
||||
'filter:slo/min_segment_size': value => $min_segment_size;
|
||||
'filter:slo/rate_limit_under_size': value => $rate_limit_under_size;
|
||||
'filter:slo/rate_limit_after_segment': value => $rate_limit_after_segment;
|
||||
'filter:slo/rate_limit_segments_per_sec': value => $rate_limit_segments_per_sec;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
Default value of the ``swift::proxy::slo::rate_limit_segments_per_sec``
|
||||
parameter has been changed from ``0`` to ``1``.
|
||||
|
||||
deprecations:
|
||||
- |
|
||||
The ``swift::proxy::slo::min_segment_size`` parameter has been deprecated
|
||||
and has no effect now.
|
|
@ -6,10 +6,9 @@ describe 'swift::proxy::slo' do
|
|||
it { is_expected.to contain_swift_proxy_config('filter:slo/use').with_value('egg:swift#slo') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_segments').with_value('1000') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_size').with_value('2097152') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:slo/min_segment_size').with_value('1048576') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_under_size').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_after_segment').with_value('10') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_segments_per_sec').with_value('0') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_segments_per_sec').with_value('1') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:slo/max_get_time').with_value('86400') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:slo/concurrency').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:slo/delete_concurrency').with_value('<SERVICE DEFAULT>') }
|
||||
|
|
Loading…
Reference in New Issue