Clean up deprecated items related to conductor/taskmanager

This change removes deprecated parmaeters and classes related to
trove-conductor and trove-taskmanager. These were deprecated during
past cycles and are ready to be removed.

Depends-on: https://review.opendev.org/839061
Change-Id: I250fb4cd098b7aaa6f4b9488e7226ffb27355046
This commit is contained in:
Takashi Kajinami 2022-04-19 11:10:49 +09:00
parent b5d6abdcbd
commit 4d87fa2c69
7 changed files with 48 additions and 233 deletions

View File

@ -32,34 +32,6 @@
# (optional) If False doesn't trace SQL requests.
# Default: $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*auth_url*]
# (optional) Authentication URL.
# Defaults to undef
#
# [*debug*]
# (optional) Rather to log the trove api service at debug level.
# Default: undef
#
# [*log_file*]
# (optional) The path of file used for logging
# If set to $::os_service_default, it will not log to any file.
# Default: undef
#
# [*log_dir*]
# (optional) directory to which trove logs are sent.
# If set to $::os_service_default, it will not log to any directory.
# Defaults undef
#
# [*use_syslog*]
# (optional) Use syslog for logging.
# Defaults to undef
#
# [*log_facility*]
# (optional) Syslog facility to receive log lines.
# Defaults to undef
#
class trove::conductor(
$enabled = true,
$manage_service = true,
@ -68,26 +40,11 @@ class trove::conductor(
$workers = $::os_workers,
$enable_profiler = $::os_service_default,
$trace_sqlalchemy = $::os_service_default,
# DEPRECATED PARAMETERS
$auth_url = undef,
$debug = undef,
$log_file = undef,
$log_dir = undef,
$use_syslog = undef,
$log_facility = undef,
) {
include trove::deps
include trove::params
# Remove individual config files so that we do not leave any parameters
# configured by older version
file { '/etc/trove/trove-conductor.conf':
ensure => absent,
require => Anchor['trove::config::begin'],
notify => Anchor['trove::config::end']
}
# basic service config
trove_config {
'DEFAULT/trove_conductor_workers': value => $workers;

View File

@ -1,45 +0,0 @@
# DEPRECATED !!
# The trove::conductor::service_credentials class helps configure auth settings
#
# == Parameters
# [*auth_url*]
# (optional) the keystone public endpoint
# Defaults to undef
#
# [*region_name*]
# (optional) the keystone region of this node
# Optional. Defaults to 'RegionOne'
#
# [*username*]
# (optional) the keystone user for trove services
# Defaults to 'trove'
#
# [*password*]
# (required) the keystone password for trove services
#
# [*project_name*]
# (optional) the keystone tenant name for trove services
# Defaults to 'services'
#
# [*project_domain_name*]
# (optional) the keystone project domain name for trove services
# Defaults to 'Default'
#
# [*user_domain_name*]
# (optional) the keystone user domain name for trove services
# Defaults to 'Default'
#
class trove::conductor::service_credentials (
$password = $::os_service_default,
$auth_url = 'http://127.0.0.1:5000/v3',
$region_name = 'RegionOne',
$username = 'trove',
$project_name = 'services',
$project_domain_name = 'Default',
$user_domain_name = 'Default',
) {
include trove::deps
warning('The trove::conductor::service_credentials class has been deprecated and has no effect.')
}

View File

@ -51,37 +51,14 @@
# NOTE: The configuration MUST NOT be already handled by this module
# or Puppet catalog compilation will fail with duplicate resources.
#
# DEPRECATED PARAMETERS
#
# [*trove_taskmanager_config*]
# (optional) Allow configuration of arbitrary trove taskmanager configurations.
# The value is an hash of trove_taskmanager_config resources.
# Defaults to undef
#
# [*trove_conductor_config*]
# (optional) Allow configuration of arbitrary trove conductor configurations.
# The value is an hash of trove_conductor_config resources.
# Defaults to undef
#
class trove::config (
$trove_config = {},
$trove_guestagent_config = {},
$trove_api_paste_ini = {},
# DPERECATED PARAMETERS
$trove_taskmanager_config = undef,
$trove_conductor_config = undef,
$trove_config = {},
$trove_guestagent_config = {},
$trove_api_paste_ini = {},
) {
include trove::deps
if $trove_taskmanager_config != undef {
warning('The trove_taskmanager_config parmaeter is deprecated and has no effect.')
}
if $trove_conductor_config != undef {
warning('The trove_conductor_config parameter is deprecated and has no effect.')
}
validate_legacy(Hash, 'validate_hash', $trove_config)
validate_legacy(Hash, 'validate_hash', $trove_guestagent_config)
validate_legacy(Hash, 'validate_hash', $trove_api_paste_ini)

View File

@ -46,37 +46,11 @@
# Trove taskmanager entry point.
# Defaults to 'trove.taskmanager.manager.Manager'.
#
# DEPRECATED OPTIONS
# DEPRECATED PARAMETERS
#
# [*use_guestagent_template*]
# (optional) Use template to provision trove guest agent configuration file.
# Defaults to true.
#
# [*auth_url*]
# (optional) Authentication URL.
# Defaults to undef
#
# [*debug*]
# (optional) Rather to log the trove api service at debug level.
# Default: undef
#
# [*log_file*]
# (optional) The path of file used for logging
# If set to $::os_service_default, it will not log to any file.
# Default: undef
#
# [*log_dir*]
# (optional) directory to which trove logs are sent.
# If set to $::os_service_default, it will not log to any directory.
# Defaults to undef
#
# [*use_syslog*]
# (optional) Use syslog for logging.
# Defaults to undef
#
# [*log_facility*]
# (optional) Syslog facility to receive log lines.
# Defaults to undef
# Defaults to false.
#
class trove::taskmanager(
$enabled = true,
@ -85,31 +59,19 @@ class trove::taskmanager(
$package_ensure = 'present',
$guestagent_config_file = '/etc/trove/trove-guestagent.conf',
$taskmanager_manager = 'trove.taskmanager.manager.Manager',
#DEPRECATED OPTIONS
$use_guestagent_template = true,
$auth_url = undef,
$debug = undef,
$log_file = undef,
$log_dir = undef,
$use_syslog = undef,
$log_facility = undef,
# DEPRECATED PARAMETERS
$use_guestagent_template = undef,
) inherits trove {
include trove::deps
include trove::params
# Remove individual config files so that we do not leave any parameters
# configured by older version
file { '/etc/trove/trove-taskmanager.conf':
ensure => absent,
require => Anchor['trove::config::begin'],
notify => Anchor['trove::config::end']
}
# basic service config
trove_config {
'DEFAULT/guest_config': value => $guestagent_config_file;
'DEFAULT/taskmanager_manager': value => $taskmanager_manager;
}
include trove::guestagent
trove::generic_service { 'taskmanager':
enabled => $enabled,
@ -119,23 +81,6 @@ class trove::taskmanager(
package_ensure => $package_ensure,
}
if $guestagent_config_file {
if $use_guestagent_template {
warning("The tempated guestagent file is deprecated and will be removed in Ocata. \
Please configure options directly with the trove::guestagent class using hiera.")
file { $guestagent_config_file:
content => template('trove/trove-guestagent.conf.erb'),
require => Anchor['trove::install::end'],
}
} else {
include trove::guestagent
}
trove_config {
'DEFAULT/guest_config': value => $guestagent_config_file
}
}
# TO-DO(mmagr): Disabling transformer workarounds bug #1402055.
# Remove this hack as soon as bug is fixed.
trove_config {

View File

@ -1,45 +0,0 @@
# DEPRECATED !!
# The trove::taskmanager::service_credentials class helps configure auth settings
#
# == Parameters
# [*auth_url*]
# (optional) the keystone public endpoint
# Defaults to undef
#
# [*region_name*]
# (optional) the keystone region of this node
# Optional. Defaults to 'RegionOne'
#
# [*username*]
# (optional) the keystone user for trove services
# Defaults to 'trove'
#
# [*password*]
# (required) the keystone password for trove services
#
# [*project_name*]
# (optional) the keystone tenant name for trove services
# Defaults to 'services'
#
# [*project_domain_name*]
# (optional) the keystone project domain name for trove services
# Defaults to 'Default'
#
# [*user_domain_name*]
# (optional) the keystone user domain name for trove services
# Defaults to 'Default'
#
class trove::taskmanager::service_credentials (
$password = $::os_service_default,
$auth_url = 'http://127.0.0.1:5000/v3',
$region_name = 'RegionOne',
$username = 'trove',
$project_name = 'services',
$project_domain_name = 'Default',
$user_domain_name = 'Default',
) {
include trove::deps
warning('The trove::conductor::service_credentials class has been deprecated and has no effect.')
}

View File

@ -0,0 +1,33 @@
---
upgrade:
- |
The following parameters of the ``trove::conductor`` class have been
removed.
- ``auth_url``
- ``debug``
- ``log_file``
- ``log_dir``
- ``use_rsyslog``
- ``log_facility``
- |
The following parameters of the ``trove::taskmanager`` class have been
removed.
- ``auth_url``
- ``debug``
- ``log_file``
- ``log_dir``
- ``use_rsyslog``
- ``log_facility``
- |
The ``trove::config::trove_conductor_config`` parameter and
the ``trove::config::trove_taskmanager_config`` parameter have been
removed.
- |
Template file for guest agent configuration has been removed. Because of
this change, the ``trove::taskmanager::use_guestagent_template`` parameter
has no effect now and the ``trove::guestagent`` class is always used.

View File

@ -24,6 +24,12 @@ describe 'trove::taskmanager' do
shared_examples 'trove-taskmanager' do
context 'with default parameters' do
let :pre_condition do
"class { 'trove::guestagent::service_credentials':
password => 'verysectrete',
}"
end
it 'includes required classes' do
is_expected.to contain_class('trove::deps')
is_expected.to contain_class('trove::params')
@ -46,19 +52,6 @@ describe 'trove::taskmanager' do
it 'configures trove-taskmanager with default parameters' do
is_expected.to contain_trove_config('DEFAULT/taskmanager_manager').with_value('trove.taskmanager.manager.Manager')
is_expected.to contain_trove_config('DEFAULT/guest_config').with_value('/etc/trove/trove-guestagent.conf')
is_expected.to contain_file('/etc/trove/trove-guestagent.conf')
end
end
context 'when set use_guestagent_template to false' do
let :pre_condition do
"class { 'trove::guestagent::service_credentials':
password => 'verysectrete',
}"
end
let :params do
{ :use_guestagent_template => false }
end
it 'configures trove-taskmanager with trove::guestagent' do