Deprecate support for expiring_objects_account_name

... because the option in swift was deprecated.

Depends-on: https://review.opendev.org/920452
Change-Id: I85c28a8ab44b12ea4df06d4e2cf577dfc2a13779
This commit is contained in:
Takashi Kajinami 2025-02-09 02:35:23 +09:00
parent cafa9a6ab7
commit ade8b31f9a
2 changed files with 18 additions and 6 deletions

View File

@ -21,10 +21,6 @@
# (optional) Number of replication workers to spawn.
# Defaults to $facts['os_service_default'].
#
# [*expiring_objects_account_name*]
# (optional) Account name used for expiring objects.
# Defaults to $facts['os_service_default'].
#
# [*interval*]
# (optional) Minimum time for a pass to take, in seconds.
# Defaults to $facts['os_service_default'].
@ -118,13 +114,18 @@
# in the object expirer config.
# Defaults to false.
#
# DEPRECATED PARAMETERS
#
# [*expiring_objects_account_name*]
# (optional) Account name used for expiring objects.
# Defaults to undef.
#
class swift::objectexpirer(
Boolean $manage_service = true,
Boolean $enabled = true,
$package_ensure = 'present',
Swift::Pipeline $pipeline = ['catch_errors', 'proxy-logging', 'cache', 'proxy-server'],
$concurrency = $facts['os_service_default'],
$expiring_objects_account_name = $facts['os_service_default'],
$interval = $facts['os_service_default'],
$process = $facts['os_service_default'],
$processes = $facts['os_service_default'],
@ -143,11 +144,17 @@ class swift::objectexpirer(
$log_address = '/dev/log',
$log_max_line_length = $facts['os_service_default'],
Boolean $purge_config = false,
# DEPRECATED PARAMETERS
$expiring_objects_account_name = undef,
) inherits swift::params {
include swift::deps
Swift_object_expirer_config<||> ~> Service['swift-object-expirer']
if $expiring_objects_account_name != undef {
warning('The expiring_objects_account_name parameter is deprecated.')
}
# On Red Hat platforms, it may be defined already,
# because it is part of openstack-swift-proxy
if $::swift::params::object_expirer_package_name != $::swift::params::proxy_package_name {
@ -211,7 +218,7 @@ class swift::objectexpirer(
swift_object_expirer_config {
'pipeline:main/pipeline': value => join($pipeline, ' ');
'object-expirer/concurrency': value => $concurrency;
'object-expirer/expiring_objects_account_name': value => $expiring_objects_account_name;
'object-expirer/expiring_objects_account_name': value => pick($expiring_objects_account_name, $facts['os_service_default']);
'object-expirer/interval': value => $interval;
'object-expirer/process': value => $process;
'object-expirer/processes': value => $processes;

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
The ``swift::objectexpirer::expiring_objects_account_name`` parameter has
been deprecated and will be removed in a future release.