Deprecate support for the allow_versions parameter
... which was deprecated since swift 2.16.0[1] in favor of the versioned_writes middleware. [1] 5e673a542401a2d95249c3c03f26175214f08c79 Change-Id: I6cf3e63839a2044ded0e5c4af2fe6f1312b42fdf
This commit is contained in:
@@ -26,10 +26,6 @@
|
|||||||
# (optional) Specify the container pipeline
|
# (optional) Specify the container pipeline
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
# [*allow_versions*]
|
|
||||||
# (optional) Enable/Disable object versioning feature
|
|
||||||
# Defaults to false
|
|
||||||
#
|
|
||||||
# [*mount_check*]
|
# [*mount_check*]
|
||||||
# (optional) Whether or not check if the devices are mounted
|
# (optional) Whether or not check if the devices are mounted
|
||||||
# to prevent accidentally writing to the root device
|
# to prevent accidentally writing to the root device
|
||||||
@@ -123,6 +119,12 @@
|
|||||||
# (optional) Override whether to use xinetd to manage rsync service
|
# (optional) Override whether to use xinetd to manage rsync service
|
||||||
# Defaults to swift::params::xinetd_available
|
# Defaults to swift::params::xinetd_available
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*allow_versions*]
|
||||||
|
# (optional) Enable/Disable object versioning feature
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
class swift::storage::all(
|
class swift::storage::all(
|
||||||
$storage_local_net_ip,
|
$storage_local_net_ip,
|
||||||
$devices = '/srv/node',
|
$devices = '/srv/node',
|
||||||
@@ -131,7 +133,6 @@ class swift::storage::all(
|
|||||||
$account_port = 6002,
|
$account_port = 6002,
|
||||||
$object_pipeline = undef,
|
$object_pipeline = undef,
|
||||||
$container_pipeline = undef,
|
$container_pipeline = undef,
|
||||||
$allow_versions = false,
|
|
||||||
$mount_check = true,
|
$mount_check = true,
|
||||||
$account_pipeline = undef,
|
$account_pipeline = undef,
|
||||||
$log_facility = 'LOG_LOCAL2',
|
$log_facility = 'LOG_LOCAL2',
|
||||||
@@ -154,10 +155,16 @@ class swift::storage::all(
|
|||||||
$splice = false,
|
$splice = false,
|
||||||
$max_connections = 25,
|
$max_connections = 25,
|
||||||
$rsync_use_xinetd = $::swift::params::xinetd_available,
|
$rsync_use_xinetd = $::swift::params::xinetd_available,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$allow_versions = undef,
|
||||||
) inherits swift::params {
|
) inherits swift::params {
|
||||||
|
|
||||||
include swift::deps
|
include swift::deps
|
||||||
|
|
||||||
|
if $allow_versions != undef {
|
||||||
|
warning('The allow_versions parameter is deprecated and will be removed in a future release')
|
||||||
|
}
|
||||||
|
|
||||||
if ("${$object_port}" == '6000') {
|
if ("${$object_port}" == '6000') {
|
||||||
warning('The default port for the object storage server has changed \
|
warning('The default port for the object storage server has changed \
|
||||||
from 6000 to 6200 and will be changed in a later release')
|
from 6000 to 6200 and will be changed in a later release')
|
||||||
|
@@ -68,10 +68,6 @@
|
|||||||
# See https://docs.openstack.org/swift/latest/deployment_guide.html#general-service-tuning
|
# See https://docs.openstack.org/swift/latest/deployment_guide.html#general-service-tuning
|
||||||
# Defaults to $::os_workers.
|
# Defaults to $::os_workers.
|
||||||
#
|
#
|
||||||
# [*allow_versions*]
|
|
||||||
# (optional) Enable/Disable object versioning feature
|
|
||||||
# Defaults to 'false'.
|
|
||||||
#
|
|
||||||
# [*replicator_concurrency*]
|
# [*replicator_concurrency*]
|
||||||
# (optional) Number of replicator workers to spawn.
|
# (optional) Number of replicator workers to spawn.
|
||||||
# Defaults to 1.
|
# Defaults to 1.
|
||||||
@@ -173,6 +169,12 @@
|
|||||||
# (optional) Number of MB allocated for the cache.
|
# (optional) Number of MB allocated for the cache.
|
||||||
# Defaults to 512, which is the swift default value.
|
# Defaults to 512, which is the swift default value.
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*allow_versions*]
|
||||||
|
# (optional) Enable/Disable object versioning feature
|
||||||
|
# Defaults to undef.
|
||||||
|
#
|
||||||
define swift::storage::server(
|
define swift::storage::server(
|
||||||
$type,
|
$type,
|
||||||
$storage_local_net_ip,
|
$storage_local_net_ip,
|
||||||
@@ -187,7 +189,6 @@ define swift::storage::server(
|
|||||||
$servers_per_port = 0,
|
$servers_per_port = 0,
|
||||||
$user = 'swift',
|
$user = 'swift',
|
||||||
$workers = $::os_workers,
|
$workers = $::os_workers,
|
||||||
$allow_versions = false,
|
|
||||||
$replicator_concurrency = 1,
|
$replicator_concurrency = 1,
|
||||||
$replicator_interval = 30,
|
$replicator_interval = 30,
|
||||||
$updater_concurrency = 1,
|
$updater_concurrency = 1,
|
||||||
@@ -213,10 +214,16 @@ define swift::storage::server(
|
|||||||
$auditor_disk_chunk_size = undef,
|
$auditor_disk_chunk_size = undef,
|
||||||
$splice = false,
|
$splice = false,
|
||||||
$object_server_mb_per_sync = 512,
|
$object_server_mb_per_sync = 512,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$allow_versions = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include swift::deps
|
include swift::deps
|
||||||
|
|
||||||
|
if $allow_versions != undef {
|
||||||
|
warning('The allow_versions parameter is deprecated and will be removed in a future release')
|
||||||
|
}
|
||||||
|
|
||||||
if ($incoming_chmod == '0644') {
|
if ($incoming_chmod == '0644') {
|
||||||
warning('The default incoming_chmod set to 0644 may yield in error prone directories and will be changed in a later release.')
|
warning('The default incoming_chmod set to 0644 may yield in error prone directories and will be changed in a later release.')
|
||||||
}
|
}
|
||||||
@@ -241,7 +248,6 @@ define swift::storage::server(
|
|||||||
validate_legacy(Enum['object', 'container', 'account'], 'validate_re',
|
validate_legacy(Enum['object', 'container', 'account'], 'validate_re',
|
||||||
$type, ['^object|container|account$'])
|
$type, ['^object|container|account$'])
|
||||||
validate_legacy(Array, 'validate_array', $pipeline)
|
validate_legacy(Array, 'validate_array', $pipeline)
|
||||||
validate_legacy(Boolean, 'validate_bool', $allow_versions)
|
|
||||||
validate_legacy(Boolean, 'validate_bool', $splice)
|
validate_legacy(Boolean, 'validate_bool', $splice)
|
||||||
# TODO - validate that name is an integer
|
# TODO - validate that name is an integer
|
||||||
|
|
||||||
|
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The following two parameters have been deprecated, and will be removed
|
||||||
|
in a future release.
|
||||||
|
|
||||||
|
- ``swift::storage::all::allow_versions``
|
||||||
|
- ``swift::storage::server::allow_versions``
|
@@ -41,7 +41,6 @@ describe 'swift::storage::all' do
|
|||||||
:object_pipeline => ["healthcheck"],
|
:object_pipeline => ["healthcheck"],
|
||||||
:container_pipeline => ["healthcheck"],
|
:container_pipeline => ["healthcheck"],
|
||||||
:account_pipeline => ["healthcheck"],
|
:account_pipeline => ["healthcheck"],
|
||||||
:allow_versions => true,
|
|
||||||
:splice => true,
|
:splice => true,
|
||||||
:log_facility => ['LOG_LOCAL2', 'LOG_LOCAL3'],
|
:log_facility => ['LOG_LOCAL2', 'LOG_LOCAL3'],
|
||||||
:incoming_chmod => '0644',
|
:incoming_chmod => '0644',
|
||||||
@@ -110,8 +109,7 @@ describe 'swift::storage::all' do
|
|||||||
:config_file_path => 'container-server.conf',
|
:config_file_path => 'container-server.conf',
|
||||||
:incoming_chmod => param_hash[:incoming_chmod],
|
:incoming_chmod => param_hash[:incoming_chmod],
|
||||||
:outgoing_chmod => param_hash[:outgoing_chmod],
|
:outgoing_chmod => param_hash[:outgoing_chmod],
|
||||||
:pipeline => param_hash[:container_pipeline] || ['container-server'],
|
:pipeline => param_hash[:container_pipeline] || ['container-server'] }.merge(storage_server_defaults)
|
||||||
:allow_versions => param_hash[:allow_versions] || false }.merge(storage_server_defaults)
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
it { is_expected.to contain_class('rsync::server').with(
|
it { is_expected.to contain_class('rsync::server').with(
|
||||||
|
@@ -29,7 +29,9 @@ log_statsd_metric_prefix = <%=@log_statsd_metric_prefix%>
|
|||||||
pipeline = <%= @pipeline.to_a.join(' ') %>
|
pipeline = <%= @pipeline.to_a.join(' ') %>
|
||||||
|
|
||||||
[app:container-server]
|
[app:container-server]
|
||||||
|
<%- if ! @allow_versions.nil? -%>
|
||||||
allow_versions = <%= @allow_versions %>
|
allow_versions = <%= @allow_versions %>
|
||||||
|
<%- end -%>
|
||||||
use = egg:swift#container
|
use = egg:swift#container
|
||||||
set log_name = <%= @log_name %>
|
set log_name = <%= @log_name %>
|
||||||
set log_facility = <%= @log_facility %>
|
set log_facility = <%= @log_facility %>
|
||||||
|
Reference in New Issue
Block a user