Deprecate the invalid messaging parameter

The [oslo_messaging_rabbit] default_notification_exchange does not
exist and the parameter belongs to the oslo_messaging_amqp section
instead from the beginning[1].

This change deprecates that invalid support directly, instead of fixing
it, because it has never worked as expected.

[1] https://review.opendev.org/c/openstack/oslo.messaging/+/333531

Closes-Bug: #1955510
Change-Id: Ic01da52434b5791da3e34fb5bfa8ff1d704e52fa
This commit is contained in:
Takashi Kajinami 2021-12-22 09:36:47 +09:00
parent e832ed4069
commit 8bb784d524
3 changed files with 18 additions and 7 deletions

View File

@ -84,10 +84,6 @@
# more than one RabbitMQ node is provided in config. (string value)
# Defaults to $::os_service_default
#
# [*rabbit_notification_exchange*]
# Exchange name for sending notifications (string value)
# Defaults to $::os_service_default
#
# [*rabbit_notification_topic*]
# AMQP topic used for OpenStack notifications. (list value)
# Defaults to $::os_service_default
@ -107,6 +103,12 @@
# messaging, messagingv2, routing, log, test, noop (multi valued)
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*rabbit_notification_exchange*]
# Exchange name for sending notifications (string value)
# Defaults to undef
#
class glance::notify::rabbitmq(
$default_transport_url = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
@ -123,11 +125,12 @@ class glance::notify::rabbitmq(
$kombu_ssl_version = $::os_service_default,
$kombu_reconnect_delay = $::os_service_default,
$kombu_failover_strategy = $::os_service_default,
$rabbit_notification_exchange = $::os_service_default,
$rabbit_notification_topic = $::os_service_default,
$amqp_durable_queues = $::os_service_default,
$kombu_compression = $::os_service_default,
$notification_driver = $::os_service_default,
# DEPRECATED PARAMETERS
$rabbit_notification_exchange = undef,
) {
include glance::deps
@ -160,7 +163,11 @@ class glance::notify::rabbitmq(
topics => $rabbit_notification_topic,
}
if $rabbit_notification_exchange != undef {
warning('The rabbit_notification_exchange parameter is deprecated and has no effect')
}
glance_api_config {
'oslo_messaging_rabbit/default_notification_exchange': value => $rabbit_notification_exchange;
'oslo_messaging_rabbit/default_notification_exchange': ensure => absent;
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``glance::notify::rabbitmq::rabbit_notification_exchange`` parameter
has been deprecated and has no effect.

View File

@ -10,7 +10,6 @@ describe 'glance::notify::rabbitmq' do
it { is_expected.to contain_glance_api_config('oslo_messaging_notifications/driver').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/default_notification_exchange').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_glance_api_config('oslo_messaging_notifications/topics').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>') }