Deprecate rabbitmq connection parameters
The rabbitmq connection parameters have been deprecated in favor of the transport_url setting. Change-Id: I196e089f7081f59360680a8921cde2c84acf0c0e Related-Bug: #1625198
This commit is contained in:
@@ -195,34 +195,16 @@
|
|||||||
# (optional) If set, use this value for max_overflow with sqlalchemy.
|
# (optional) If set, use this value for max_overflow with sqlalchemy.
|
||||||
# Defaults to: undef
|
# Defaults to: undef
|
||||||
#
|
#
|
||||||
# [*rabbit_host*]
|
# [*default_transport_url*]
|
||||||
# (optional) Location of rabbitmq installation.
|
# (optional) A URL representing the messaging driver to use and its full
|
||||||
|
# configuration. Transport URLs take the form:
|
||||||
|
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*rabbit_port*]
|
|
||||||
# (optional) Port for rabbitmq instance.
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*rabbit_hosts*]
|
|
||||||
# (optional) Location of rabbitmq installation.
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*rabbit_ha_queues*]
|
# [*rabbit_ha_queues*]
|
||||||
# (Optional) Use HA queues in RabbitMQ.
|
# (Optional) Use HA queues in RabbitMQ.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*rabbit_password*]
|
|
||||||
# (optional) Password used to connect to rabbitmq.
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*rabbit_userid*]
|
|
||||||
# (optional) User used to connect to rabbitmq.
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*rabbit_virtual_host*]
|
|
||||||
# (optional) The RabbitMQ virtual host.
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*rabbit_heartbeat_timeout_threshold*]
|
# [*rabbit_heartbeat_timeout_threshold*]
|
||||||
# (optional) Number of seconds after which the RabbitMQ broker is considered
|
# (optional) Number of seconds after which the RabbitMQ broker is considered
|
||||||
# down if the heartbeat keepalive fails. Any value >0 enables heartbeats.
|
# down if the heartbeat keepalive fails. Any value >0 enables heartbeats.
|
||||||
@@ -570,7 +552,7 @@
|
|||||||
# in the keystone config.
|
# in the keystone config.
|
||||||
# Defaults to false.
|
# Defaults to false.
|
||||||
#
|
#
|
||||||
# DEPRECATED PARAMETERS
|
# === DEPRECATED PARAMETERS
|
||||||
#
|
#
|
||||||
# [*service_provider*]
|
# [*service_provider*]
|
||||||
# (optional) Deprecated. Provider, that can be used for keystone service.
|
# (optional) Deprecated. Provider, that can be used for keystone service.
|
||||||
@@ -612,6 +594,30 @@
|
|||||||
# (optional) Deprecated. Key size (in bits) for token signing cert (auto generated certificate)
|
# (optional) Deprecated. Key size (in bits) for token signing cert (auto generated certificate)
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*rabbit_host*]
|
||||||
|
# (optional) Location of rabbitmq installation.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*rabbit_port*]
|
||||||
|
# (optional) Port for rabbitmq instance.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*rabbit_hosts*]
|
||||||
|
# (optional) Location of rabbitmq installation.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*rabbit_password*]
|
||||||
|
# (optional) Password used to connect to rabbitmq.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*rabbit_userid*]
|
||||||
|
# (optional) User used to connect to rabbitmq.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*rabbit_virtual_host*]
|
||||||
|
# (optional) The RabbitMQ virtual host.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# == Dependencies
|
# == Dependencies
|
||||||
# None
|
# None
|
||||||
#
|
#
|
||||||
@@ -691,15 +697,10 @@ class keystone(
|
|||||||
$database_min_pool_size = undef,
|
$database_min_pool_size = undef,
|
||||||
$database_max_pool_size = undef,
|
$database_max_pool_size = undef,
|
||||||
$database_max_overflow = undef,
|
$database_max_overflow = undef,
|
||||||
$rabbit_host = $::os_service_default,
|
|
||||||
$rabbit_hosts = $::os_service_default,
|
|
||||||
$rabbit_password = $::os_service_default,
|
|
||||||
$rabbit_port = $::os_service_default,
|
|
||||||
$rabbit_userid = $::os_service_default,
|
|
||||||
$rabbit_virtual_host = $::os_service_default,
|
|
||||||
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
||||||
$rabbit_heartbeat_rate = $::os_service_default,
|
$rabbit_heartbeat_rate = $::os_service_default,
|
||||||
$rabbit_use_ssl = $::os_service_default,
|
$rabbit_use_ssl = $::os_service_default,
|
||||||
|
$default_transport_url = $::os_service_default,
|
||||||
$rabbit_ha_queues = $::os_service_default,
|
$rabbit_ha_queues = $::os_service_default,
|
||||||
$kombu_ssl_ca_certs = $::os_service_default,
|
$kombu_ssl_ca_certs = $::os_service_default,
|
||||||
$kombu_ssl_certfile = $::os_service_default,
|
$kombu_ssl_certfile = $::os_service_default,
|
||||||
@@ -755,6 +756,12 @@ class keystone(
|
|||||||
$signing_ca_key = $::os_service_default,
|
$signing_ca_key = $::os_service_default,
|
||||||
$signing_cert_subject = $::os_service_default,
|
$signing_cert_subject = $::os_service_default,
|
||||||
$signing_key_size = $::os_service_default,
|
$signing_key_size = $::os_service_default,
|
||||||
|
$rabbit_host = $::os_service_default,
|
||||||
|
$rabbit_hosts = $::os_service_default,
|
||||||
|
$rabbit_password = $::os_service_default,
|
||||||
|
$rabbit_port = $::os_service_default,
|
||||||
|
$rabbit_userid = $::os_service_default,
|
||||||
|
$rabbit_virtual_host = $::os_service_default,
|
||||||
) inherits keystone::params {
|
) inherits keystone::params {
|
||||||
|
|
||||||
include ::keystone::deps
|
include ::keystone::deps
|
||||||
@@ -769,6 +776,17 @@ class keystone(
|
|||||||
use a Puppet resource collector if you want to modify the service provider.")
|
use a Puppet resource collector if you want to modify the service provider.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !is_service_default($rabbit_host) or
|
||||||
|
!is_service_default($rabbit_hosts) or
|
||||||
|
!is_service_default($rabbit_password) or
|
||||||
|
!is_service_default($rabbit_port) or
|
||||||
|
!is_service_default($rabbit_userid) or
|
||||||
|
!is_service_default($rabbit_virtual_host) {
|
||||||
|
warning("keystone::rabbit_host, keystone::rabbit_hosts, keystone::rabbit_password, \
|
||||||
|
keystone::rabbit_port, keystone::rabbit_userid and keystone::rabbit_virtual_host are \
|
||||||
|
deprecated. Please use keystone::default_transport_url instead.")
|
||||||
|
}
|
||||||
|
|
||||||
if ! $catalog_driver {
|
if ! $catalog_driver {
|
||||||
validate_re($catalog_type, 'template|sql')
|
validate_re($catalog_type, 'template|sql')
|
||||||
}
|
}
|
||||||
@@ -1025,6 +1043,7 @@ Fernet or UUID tokens are recommended.")
|
|||||||
}
|
}
|
||||||
|
|
||||||
oslo::messaging::default { 'keystone_config':
|
oslo::messaging::default { 'keystone_config':
|
||||||
|
transport_url => $default_transport_url,
|
||||||
control_exchange => $control_exchange,
|
control_exchange => $control_exchange,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- keystone::rabbit_host, keystone::rabbit_hosts, keystone::rabbit_password,
|
||||||
|
keystone::rabbit_port, keystone::rabbit_userid and
|
||||||
|
keystone::rabbit_virtual_host are deprecated.
|
||||||
|
keystone::default_transport_url should be used instead.
|
@@ -56,6 +56,7 @@ describe 'keystone' do
|
|||||||
'signing_ca_key' => '<SERVICE DEFAULT>',
|
'signing_ca_key' => '<SERVICE DEFAULT>',
|
||||||
'signing_cert_subject' => '<SERVICE DEFAULT>',
|
'signing_cert_subject' => '<SERVICE DEFAULT>',
|
||||||
'signing_key_size' => '<SERVICE DEFAULT>',
|
'signing_key_size' => '<SERVICE DEFAULT>',
|
||||||
|
'default_transport_url' => '<SERVICE DEFAULT>',
|
||||||
'rabbit_host' => '<SERVICE DEFAULT>',
|
'rabbit_host' => '<SERVICE DEFAULT>',
|
||||||
'rabbit_password' => '<SERVICE DEFAULT>',
|
'rabbit_password' => '<SERVICE DEFAULT>',
|
||||||
'rabbit_userid' => '<SERVICE DEFAULT>',
|
'rabbit_userid' => '<SERVICE DEFAULT>',
|
||||||
@@ -107,6 +108,7 @@ describe 'keystone' do
|
|||||||
'signing_ca_key' => '/etc/keystone/ssl/private/cakey.pem',
|
'signing_ca_key' => '/etc/keystone/ssl/private/cakey.pem',
|
||||||
'signing_cert_subject' => '/C=US/ST=Unset/L=Unset/O=Unset/CN=www.example.com',
|
'signing_cert_subject' => '/C=US/ST=Unset/L=Unset/O=Unset/CN=www.example.com',
|
||||||
'signing_key_size' => 2048,
|
'signing_key_size' => 2048,
|
||||||
|
'default_transport_url' => 'rabbit://user:pass@host:1234/virt',
|
||||||
'rabbit_host' => '127.0.0.1',
|
'rabbit_host' => '127.0.0.1',
|
||||||
'rabbit_password' => 'openstack',
|
'rabbit_password' => 'openstack',
|
||||||
'rabbit_userid' => 'admin',
|
'rabbit_userid' => 'admin',
|
||||||
@@ -228,6 +230,10 @@ describe 'keystone' do
|
|||||||
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_password').with_value(param_hash['rabbit_password']).with_secret(true)
|
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_password').with_value(param_hash['rabbit_password']).with_secret(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should contain correct default transport url' do
|
||||||
|
is_expected.to contain_keystone_config('DEFAULT/transport_url').with_value(params['default_transport_url'])
|
||||||
|
end
|
||||||
|
|
||||||
it 'should contain correct rabbit heartbeat configuration' do
|
it 'should contain correct rabbit heartbeat configuration' do
|
||||||
is_expected.to contain_keystone_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value(param_hash['rabbit_heartbeat_timeout_threshold'])
|
is_expected.to contain_keystone_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value(param_hash['rabbit_heartbeat_timeout_threshold'])
|
||||||
is_expected.to contain_keystone_config('oslo_messaging_rabbit/heartbeat_rate').with_value(param_hash['rabbit_heartbeat_rate'])
|
is_expected.to contain_keystone_config('oslo_messaging_rabbit/heartbeat_rate').with_value(param_hash['rabbit_heartbeat_rate'])
|
||||||
|
Reference in New Issue
Block a user