Browse Source

Merge "Fix ignored auth_url parameters"

changes/02/826002/1
Zuul 4 months ago committed by Gerrit Code Review
parent
commit
caab4a9286
  1. 13
      manifests/conductor.pp
  2. 10
      manifests/conductor/service_credentials.pp
  3. 22
      manifests/taskmanager.pp
  4. 10
      manifests/taskmanager/service_credentials.pp
  5. 17
      releasenotes/notes/fix-auth_url-330322b223994b41.yaml

13
manifests/conductor.pp

@ -38,10 +38,6 @@
# (optional) Syslog facility to receive log lines.
# Defaults to 'LOG_USER'.
#
# [*auth_url*]
# (optional) Authentication URL.
# Defaults to 'http://localhost:5000/v3'.
#
# [*conductor_manager*]
# (optional) Trove conductor manager.
# Defaults to 'trove.conductor.manager.Manager'.
@ -58,6 +54,12 @@
# (optional) If False doesn't trace SQL requests.
# Default: $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*auth_url*]
# (optional) Authentication URL.
# Defaults to undef
#
class trove::conductor(
$enabled = true,
$manage_service = true,
@ -67,11 +69,12 @@ class trove::conductor(
$log_dir = '/var/log/trove',
$use_syslog = $::os_service_default,
$log_facility = $::os_service_default,
$auth_url = 'http://localhost:5000/v3',
$conductor_manager = 'trove.conductor.manager.Manager',
$workers = $::os_workers,
$enable_profiler = $::os_service_default,
$trace_sqlalchemy = $::os_service_default,
# DEPRECATED PARAMETERS
$auth_url = undef
) inherits trove {
include trove::deps

10
manifests/conductor/service_credentials.pp

@ -30,7 +30,7 @@
#
class trove::conductor::service_credentials (
$password = $::os_service_default,
$auth_url = undef,
$auth_url = 'http://127.0.0.1:5000/v3',
$region_name = 'RegionOne',
$username = 'trove',
$project_name = 'services',
@ -40,13 +40,7 @@ class trove::conductor::service_credentials (
include trove::deps
if $auth_url == undef {
warning('The auto detection of auth_url from www_authenticate_uri will be \
removed in a future release. Please set trove::conductor::service_credentials::auth_url .')
$auth_url_base = pick($::trove::keystone::authtoken::www_authenticate_uri, 'http://127.0.0.1:5000/v3')
} else {
$auth_url_base = $auth_url
}
$auth_url_base = pick($::trove::conductor::auth_url, $auth_url)
$auth_url_real = "${regsubst($auth_url_base, '(\/v3$|\/v2.0$|\/$)', '')}/v3"
$username_real = pick($::trove::nova_proxy_admin_user, $username)

22
manifests/taskmanager.pp

@ -60,14 +60,16 @@
# (optional) Syslog facility to receive log lines.
# Defaults to 'LOG_USER'.
#
# [*auth_url*]
# (optional) Authentication URL.
# Defaults to 'http://localhost:5000/v3'.
#
# [*guestagent_config_file*]
# (optional) Trove guest agent configuration file.
# Defaults to '/etc/trove/trove-guestagent.conf'.
#
# [*taskmanager_manager*]
# Trove taskmanager entry point.
# Defaults to 'trove.taskmanager.manager.Manager'.
#
# DEPRECATED OPTIONS
#
# [*default_neutron_networks*]
# (optional) The network that trove will attach by default.
# Defaults to undef.
@ -76,16 +78,14 @@
# (optional) Message queue name the Taskmanager will listen to.
# Defaults to 'taskmanager'.
#
# [*taskmanager_manager*]
# Trove taskmanager entry point.
# Defaults to 'trove.taskmanager.manager.Manager'.
#
# DEPRECATED OPTIONS
#
# [*use_guestagent_template*]
# (optional) Use template to provision trove guest agent configuration file.
# Defaults to true.
#
# [*auth_url*]
# (optional) Authentication URL.
# Defaults to undef
#
class trove::taskmanager(
$enabled = true,
$manage_service = true,
@ -95,7 +95,6 @@ class trove::taskmanager(
$use_syslog = $::os_service_default,
$guest_log_file = '/var/log/trove/trove-guestagent.log',
$log_facility = $::os_service_default,
$auth_url = 'http://localhost:5000/v3',
$package_ensure = 'present',
$guestagent_config_file = '/etc/trove/trove-guestagent.conf',
$taskmanager_manager = 'trove.taskmanager.manager.Manager',
@ -103,6 +102,7 @@ class trove::taskmanager(
$default_neutron_networks = undef,
$taskmanager_queue = undef,
$use_guestagent_template = true,
$auth_url = undef,
) inherits trove {
include trove::deps

10
manifests/taskmanager/service_credentials.pp

@ -30,7 +30,7 @@
#
class trove::taskmanager::service_credentials (
$password = $::os_service_default,
$auth_url = undef,
$auth_url = 'http://127.0.0.1:5000/v3',
$region_name = 'RegionOne',
$username = 'trove',
$project_name = 'services',
@ -40,13 +40,7 @@ class trove::taskmanager::service_credentials (
include trove::deps
if $auth_url == undef {
warning('The auto detection of auth_url from www_authenticate_uri will be \
removed in a future release. Please set trove::taskmanager::service_credentials::auth_url .')
$auth_url_base = pick($::trove::keystone::authtoken::www_authenticate_uri, 'http://127.0.0.1:5000/v3')
} else {
$auth_url_base = $auth_url
}
$auth_url_base = pick($::trove::taskmanager::auth_url, $auth_url)
$auth_url_real = "${regsubst($auth_url_base, '(\/v3$|\/v2.0$|\/$)', '')}/v3"
$username_real = pick($::trove::nova_proxy_admin_user, $username)

17
releasenotes/notes/fix-auth_url-330322b223994b41.yaml

@ -0,0 +1,17 @@
---
deprecations:
- |
The ``trove::taskmanager::auth_url parameter has been deprecated. Use
the ``trove::taskmanager::service_credentials::auth_url`` parameter
instead.
- |
The ``trove::conductor::auth_url parameter has been deprecated. Use
the ``trove::conductor::service_credentials::auth_url`` parameter
instead.
fixes:
- |
Now the ``trove::taskmanager::auth_url`` parameter and
the ``trove:conductor::auth_url`` parameter take effect and are used to
define value of ``[service_credentials] auth_url`` parameter.
Loading…
Cancel
Save