Fix doc section to enable cinder notifications

The section in the Watcher docs that describes how to enable cinder
notifications incorrectly tells the user to change the cinder config to
send notification to the watcher.watcher_notifications exchange and
topic. Instead, it should instruct the user to change the Watcher
configuration of the notification_topics [1] to listen to the
'openstack.notifications', which is the one used by cinder by
default[2].

This patch also adds 'openstack.notifications' to the default value
for the 'notification_topics' parameter.

[1] https://docs.openstack.org/watcher/latest/configuration/watcher.html#watcher_decision_engine.notification_topics
[2] https://docs.openstack.org/cinder/latest/configuration/block-storage/samples/cinder.conf.html

Partial-Bug: 2121384
Change-Id: I4dc1a72af79a23c9ca07d2da5ff41bd7741e37d8
Signed-off-by: jgilaber <jgilaber@redhat.com>
This commit is contained in:
jgilaber
2025-08-18 12:43:39 +02:00
parent 8309d9848a
commit a4b785e4f1
3 changed files with 35 additions and 9 deletions

View File

@@ -429,20 +429,38 @@ Configure Cinder Notifications
Watcher can also consume notifications generated by the Cinder services, in Watcher can also consume notifications generated by the Cinder services, in
order to build or update, in real time, its cluster data model related to order to build or update, in real time, its cluster data model related to
storage resources. To do so, you have to update the Cinder configuration storage resources.
file on controller and volume nodes, in order to let Watcher receive Cinder
notifications in a dedicated ``watcher_notifications`` channel.
* In the file ``/etc/cinder/cinder.conf``, update the section Cinder emits notifications on the ``notifications`` topic, in the openstack
``[oslo_messaging_notifications]``, by redefining the list of topics control exchange (as it can be seen in the `Cinder conf`_).
into which Cinder services will publish events ::
* In the file ``/etc/cinder/cinder.conf``, the value of driver in the section
``[oslo_messaging_notifications]`` can't be noop.
[oslo_messaging_notifications] [oslo_messaging_notifications]
driver = messagingv2 driver = messagingv2
topics = notifications,watcher_notifications
* Restart the Cinder services. .. _`Cinder conf`: https://docs.openstack.org/cinder/latest/configuration/block-storage/samples/cinder.conf.html
Configure Watcher listening to the Notifications
================================================
To consume either Cinder or Nova notifications, (or both), Watcher must be
configured to listen to the notifications topics that Cinder and Nova emit.
Use the `notification_topics`_ config option to indicate to Watcher that it
should listen to the correct topics. By default, Cinder emits notifications
on ``openstack.notifications``, while Nova emits notifications on
``nova.versioned_notifications``. The Watcher conf should have the topics for
the desired notifications, below is an example for both Cinder and Nova::
[watcher_decision_engine]
...
notification_topics = nova.versioned_notifications,openstack.notifications
.. _`notification_topics`: https://docs.openstack.org/watcher/latest/configuration/watcher.html#watcher_decision_engine.notification_topics
Workers Workers
======= =======

View File

@@ -0,0 +1,7 @@
---
upgrade:
- |
Watcher now listens by default to the exchange and channel used by default
in Cinder, which is 'openstack.notifications'. The previous instructions
in the documentation to enable cinder notifications have been modified to
make clear that there is no need of changing the cinder conf.

View File

@@ -31,7 +31,8 @@ WATCHER_DECISION_ENGINE_OPTS = [
'used for RPC calls'), 'used for RPC calls'),
cfg.ListOpt('notification_topics', cfg.ListOpt('notification_topics',
default=['nova.versioned_notifications', default=['nova.versioned_notifications',
'watcher.watcher_notifications'], 'watcher.watcher_notifications',
'openstack.notifications'],
help='The exchange and topic names from which ' help='The exchange and topic names from which '
'notification events will be listened to. ' 'notification events will be listened to. '
'The exchange should be specified to get ' 'The exchange should be specified to get '