Deprecate oslo.messaging rpc_backend option parameter
Oslo.messaging uses the transport_url to represent the rpc and notification messaging driver to use and its full configuration. The rpc_backend configuration option is deprecated for removal and should not gate oslo.messaging driver configuration options. This patch: * deprecate rpc_backend * remove conditional check * update spec tests * add release note Change-Id: I899a6c24393b4f980e446452d7681c68ee54a0bf
This commit is contained in:
@@ -73,12 +73,6 @@
|
|||||||
# option.
|
# option.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*rpc_backend*]
|
|
||||||
# (optional) The rpc backend implementation to use, can be:
|
|
||||||
# rabbit (for rabbitmq)
|
|
||||||
# zmq (for zeromq)
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*image_service*]
|
# [*image_service*]
|
||||||
# (optional) Service used to search for and retrieve images.
|
# (optional) Service used to search for and retrieve images.
|
||||||
# Defaults to 'nova.image.glance.GlanceImageService'
|
# Defaults to 'nova.image.glance.GlanceImageService'
|
||||||
@@ -435,6 +429,12 @@
|
|||||||
# (optional) The RabbitMQ virtual host. (string value)
|
# (optional) The RabbitMQ virtual host. (string value)
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*rpc_backend*]
|
||||||
|
# (optional) The rpc backend implementation to use, can be:
|
||||||
|
# rabbit (for rabbitmq)
|
||||||
|
# zmq (for zeromq)
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
class nova(
|
class nova(
|
||||||
$ensure_package = 'present',
|
$ensure_package = 'present',
|
||||||
$database_connection = undef,
|
$database_connection = undef,
|
||||||
@@ -454,7 +454,6 @@ class nova(
|
|||||||
$default_transport_url = $::os_service_default,
|
$default_transport_url = $::os_service_default,
|
||||||
$rpc_response_timeout = $::os_service_default,
|
$rpc_response_timeout = $::os_service_default,
|
||||||
$control_exchange = $::os_service_default,
|
$control_exchange = $::os_service_default,
|
||||||
$rpc_backend = $::os_service_default,
|
|
||||||
$image_service = 'nova.image.glance.GlanceImageService',
|
$image_service = 'nova.image.glance.GlanceImageService',
|
||||||
# these glance params should be optional
|
# these glance params should be optional
|
||||||
# this should probably just be configured as a glance client
|
# this should probably just be configured as a glance client
|
||||||
@@ -534,6 +533,7 @@ class nova(
|
|||||||
$rabbit_port = $::os_service_default,
|
$rabbit_port = $::os_service_default,
|
||||||
$rabbit_userid = $::os_service_default,
|
$rabbit_userid = $::os_service_default,
|
||||||
$rabbit_virtual_host = $::os_service_default,
|
$rabbit_virtual_host = $::os_service_default,
|
||||||
|
$rpc_backend = $::os_service_default,
|
||||||
) inherits nova::params {
|
) inherits nova::params {
|
||||||
|
|
||||||
include ::nova::deps
|
include ::nova::deps
|
||||||
@@ -552,10 +552,12 @@ class nova(
|
|||||||
!is_service_default($rabbit_password) or
|
!is_service_default($rabbit_password) or
|
||||||
!is_service_default($rabbit_port) or
|
!is_service_default($rabbit_port) or
|
||||||
!is_service_default($rabbit_userid) or
|
!is_service_default($rabbit_userid) or
|
||||||
!is_service_default($rabbit_virtual_host) {
|
!is_service_default($rabbit_virtual_host) or
|
||||||
|
!is_service_default($rpc_backend) {
|
||||||
warning("nova::rabbit_host, nova::rabbit_hosts, nova::rabbit_password, \
|
warning("nova::rabbit_host, nova::rabbit_hosts, nova::rabbit_password, \
|
||||||
nova::rabbit_port, nova::rabbit_userid and nova::rabbit_virtual_host are \
|
nova::rabbit_port, nova::rabbit_userid, nova::rabbit_virtual_host and \
|
||||||
deprecated. Please use nova::default_transport_url instead.")
|
nova::rpc_backend are deprecated. Please use nova::default_transport_url \
|
||||||
|
instead.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if $use_ssl {
|
if $use_ssl {
|
||||||
@@ -656,49 +658,43 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.")
|
|||||||
'DEFAULT/disk_allocation_ratio': value => $disk_allocation_ratio;
|
'DEFAULT/disk_allocation_ratio': value => $disk_allocation_ratio;
|
||||||
}
|
}
|
||||||
|
|
||||||
# we keep "nova.openstack.common.rpc.impl_kombu" for backward compatibility
|
oslo::messaging::rabbit {'nova_config':
|
||||||
# but since Icehouse, "rabbit" is enough.
|
rabbit_password => $rabbit_password,
|
||||||
if $rpc_backend in [$::os_service_default, 'nova.openstack.common.rpc.impl_kombu', 'rabbit'] {
|
rabbit_userid => $rabbit_userid,
|
||||||
oslo::messaging::rabbit {'nova_config':
|
rabbit_virtual_host => $rabbit_virtual_host,
|
||||||
rabbit_password => $rabbit_password,
|
rabbit_use_ssl => $rabbit_use_ssl,
|
||||||
rabbit_userid => $rabbit_userid,
|
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
||||||
rabbit_virtual_host => $rabbit_virtual_host,
|
heartbeat_rate => $rabbit_heartbeat_rate,
|
||||||
rabbit_use_ssl => $rabbit_use_ssl,
|
kombu_reconnect_delay => $kombu_reconnect_delay,
|
||||||
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
amqp_durable_queues => $amqp_durable_queues,
|
||||||
heartbeat_rate => $rabbit_heartbeat_rate,
|
kombu_compression => $kombu_compression,
|
||||||
kombu_reconnect_delay => $kombu_reconnect_delay,
|
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
||||||
amqp_durable_queues => $amqp_durable_queues,
|
kombu_ssl_certfile => $kombu_ssl_certfile,
|
||||||
kombu_compression => $kombu_compression,
|
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
||||||
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
kombu_ssl_version => $kombu_ssl_version,
|
||||||
kombu_ssl_certfile => $kombu_ssl_certfile,
|
rabbit_hosts => $rabbit_hosts,
|
||||||
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
rabbit_host => $rabbit_host,
|
||||||
kombu_ssl_version => $kombu_ssl_version,
|
rabbit_port => $rabbit_port,
|
||||||
rabbit_hosts => $rabbit_hosts,
|
rabbit_ha_queues => $rabbit_ha_queues,
|
||||||
rabbit_host => $rabbit_host,
|
}
|
||||||
rabbit_port => $rabbit_port,
|
|
||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
oslo::messaging::amqp { 'nova_config':
|
||||||
}
|
server_request_prefix => $amqp_server_request_prefix,
|
||||||
} elsif $rpc_backend == 'amqp' {
|
broadcast_prefix => $amqp_broadcast_prefix,
|
||||||
oslo::messaging::amqp { 'nova_config':
|
group_request_prefix => $amqp_group_request_prefix,
|
||||||
server_request_prefix => $amqp_server_request_prefix,
|
container_name => $amqp_container_name,
|
||||||
broadcast_prefix => $amqp_broadcast_prefix,
|
idle_timeout => $amqp_idle_timeout,
|
||||||
group_request_prefix => $amqp_group_request_prefix,
|
trace => $amqp_trace,
|
||||||
container_name => $amqp_container_name,
|
ssl_ca_file => $amqp_ssl_ca_file,
|
||||||
idle_timeout => $amqp_idle_timeout,
|
ssl_cert_file => $amqp_ssl_cert_file,
|
||||||
trace => $amqp_trace,
|
ssl_key_file => $amqp_ssl_key_file,
|
||||||
ssl_ca_file => $amqp_ssl_ca_file,
|
ssl_key_password => $amqp_ssl_key_password,
|
||||||
ssl_cert_file => $amqp_ssl_cert_file,
|
allow_insecure_clients => $amqp_allow_insecure_clients,
|
||||||
ssl_key_file => $amqp_ssl_key_file,
|
sasl_mechanisms => $amqp_sasl_mechanisms,
|
||||||
ssl_key_password => $amqp_ssl_key_password,
|
sasl_config_dir => $amqp_sasl_config_dir,
|
||||||
allow_insecure_clients => $amqp_allow_insecure_clients,
|
sasl_config_name => $amqp_sasl_config_name,
|
||||||
sasl_mechanisms => $amqp_sasl_mechanisms,
|
username => $amqp_username,
|
||||||
sasl_config_dir => $amqp_sasl_config_dir,
|
password => $amqp_password,
|
||||||
sasl_config_name => $amqp_sasl_config_name,
|
|
||||||
username => $amqp_username,
|
|
||||||
password => $amqp_password,
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
nova_config { 'DEFAULT/rpc_backend': value => $rpc_backend }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# SSL Options
|
# SSL Options
|
||||||
|
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- nova::rpc_backend is deprecated and will be removed in a future
|
||||||
|
release. Please use nova::default_transport_url instead.
|
@@ -342,11 +342,7 @@ describe 'nova' do
|
|||||||
it { is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('rabbit') }
|
it { is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('rabbit') }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with amqp rpc_backend default parameters' do
|
context 'with amqp default parameters' do
|
||||||
let :params do
|
|
||||||
{ :rpc_backend => 'amqp' }
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures amqp' do
|
it 'configures amqp' do
|
||||||
is_expected.to contain_nova_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -367,10 +363,9 @@ describe 'nova' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with amqp rpc_backend overriden parameters' do
|
context 'with amqp overriden parameters' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :rpc_backend => 'amqp',
|
{ :amqp_idle_timeout => '60',
|
||||||
:amqp_idle_timeout => '60',
|
|
||||||
:amqp_trace => true,
|
:amqp_trace => true,
|
||||||
:amqp_ssl_ca_file => '/etc/ca.cert',
|
:amqp_ssl_ca_file => '/etc/ca.cert',
|
||||||
:amqp_ssl_cert_file => '/etc/certfile',
|
:amqp_ssl_cert_file => '/etc/certfile',
|
||||||
|
Reference in New Issue
Block a user