Deprecate ironic::glance::swift_account_project_name

This parameter has been supposed to allow users to use project name,
instead of project id, and have puppet code look up project id
automatically.

However this implementation has been problematic, especially in usual
usecase where a single set of manifests is used to set up all services.
The most challenging point is the unavoidable circular dependency.
Resolving the parameter requires access to Keystone API, which is not
correctly enforced now, while setting the parameter should trigger
restarting ironic services. When ironic-api and keystone are both
running by httpd+mod_wsgi, this eventually results in circular
dependency, because the parameter requires httpd and notifies httpd.

This change deprecates the parameter, since it has not been working
as intended in most of the cases.

Change-Id: Icdea064773915a5f68beb3a08590645aba6d29bc
This commit is contained in:
Takashi Kajinami 2022-02-12 23:50:05 +09:00
parent 41b1408e48
commit fb064ecb91
2 changed files with 17 additions and 8 deletions

View File

@ -59,13 +59,6 @@
# Can not be set together with swift_account_project_name.
# Defaults to $::os_service_default
#
# [*swift_account_project_name*]
# (optional) The project of account that Glance uses to communicate with Swift.
# Will be converted to UUID, and option glance/swift_account will be set in
# the "AUTH_uuid" format.
# Can not be set together with swift_account.
# Defaults to undef, which leaves the configuration intact
#
# [*swift_container*]
# (optional) Swift container where Glance images are stored. Used for
# generating temporary URLs.
@ -95,6 +88,13 @@
# Has no effect, use endpoint_override.
# Defaults to undef
#
# [*swift_account_project_name*]
# (optional) The project of account that Glance uses to communicate with Swift.
# Will be converted to UUID, and option glance/swift_account will be set in
# the "AUTH_uuid" format.
# Can not be set together with swift_account.
# Defaults to undef, which leaves the configuration intact
#
class ironic::glance (
$auth_type = 'password',
$auth_url = $::os_service_default,
@ -111,10 +111,10 @@ class ironic::glance (
$swift_endpoint_url = $::os_service_default,
$swift_temp_url_key = $::os_service_default,
$swift_temp_url_duration = $::os_service_default,
$swift_account_project_name = undef,
$endpoint_override = $::os_service_default,
# DEPRECATED PARAMETERS
$api_servers = undef,
$swift_account_project_name = undef,
) {
if $api_servers {
@ -122,6 +122,10 @@ class ironic::glance (
has no effect. Please use ironic::glance::endpoint_override instead.")
}
if $swift_account_project_name != undef {
warning('The swift_account_project_name parameter is deprecated and will be removed in a future release.')
}
if ($swift_account_project_name and !is_service_default($swift_account)) {
fail('swift_account_project_name and swift_account can not be specified in the same time.')
}

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
The ``ironic::glance::swift_account_project_name`` parameter is deprecated
and will be removed in a future release.