Stop converting service name in RHEL/CentOS

Usage of service_name='barbican-api' in RHEL/CentOS was deprecated
during Victoria cycle[1]. This change removes that deprecated usage and
enforces the actual service name which is 'openstack-barbican-api', as
is done in the other modules.

[1] 67e4879c75

Change-Id: I696b3e3b1daa346b6667b288c21b5389d59eeac2
This commit is contained in:
Takashi Kajinami 2022-01-08 00:11:37 +09:00
parent 9b0d38b342
commit d0f34f0d30
2 changed files with 8 additions and 7 deletions

View File

@ -467,17 +467,12 @@ class barbican::api (
$service_ensure = 'stopped'
}
if $service_name == 'barbican-api' or $service_name == $::barbican::params::api_service_name {
if $service_name == $::barbican::params::api_service_name {
if $::operatingsystem == 'Ubuntu' {
fail('With Ubuntu packages the service_name must be set to httpd as there is no eventlet init script.')
}
if $::osfamily == 'RedHat' and $service_name == 'barbican-api' {
warning('The usage of barbican-api as service_name in Red Hat based OS is \
deprecated and will be removed in a future release. Use openstack-barbican-api instead.')
}
service { 'barbican-api':
ensure => $service_ensure,
name => $::barbican::params::api_service_name,
@ -512,7 +507,7 @@ deprecated and will be removed in a future release. Use openstack-barbican-api i
Service['barbican-api'] -> Service[$service_name]
}
} else {
fail('Invalid service_name. Use barbican-api for stand-alone or httpd')
fail('Invalid service_name.')
}
}

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The ``barbican::api::service_name`` no longer accetps ``barbican-api``
as a valid service name in RHEL/CentOS. Use the actual service name,
``openstack-barbican-api`` instead.