diff --git a/doc/source/configuration/configuring.rst b/doc/source/configuration/configuring.rst index 636650eda..8e20608c9 100644 --- a/doc/source/configuration/configuring.rst +++ b/doc/source/configuration/configuring.rst @@ -429,20 +429,38 @@ Configure Cinder Notifications 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 -storage resources. To do so, you have to update the Cinder configuration -file on controller and volume nodes, in order to let Watcher receive Cinder -notifications in a dedicated ``watcher_notifications`` channel. +storage resources. - * In the file ``/etc/cinder/cinder.conf``, update the section - ``[oslo_messaging_notifications]``, by redefining the list of topics - into which Cinder services will publish events :: +Cinder emits notifications on the ``notifications`` topic, in the openstack +control exchange (as it can be seen in the `Cinder conf`_). + + * In the file ``/etc/cinder/cinder.conf``, the value of driver in the section + ``[oslo_messaging_notifications]`` can't be noop. [oslo_messaging_notifications] 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 ======= diff --git a/releasenotes/notes/update-notification-topics-daf6303a63963ee9.yaml b/releasenotes/notes/update-notification-topics-daf6303a63963ee9.yaml new file mode 100644 index 000000000..82a045724 --- /dev/null +++ b/releasenotes/notes/update-notification-topics-daf6303a63963ee9.yaml @@ -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. diff --git a/watcher/conf/decision_engine.py b/watcher/conf/decision_engine.py index 770924bee..b48f5750f 100644 --- a/watcher/conf/decision_engine.py +++ b/watcher/conf/decision_engine.py @@ -31,7 +31,8 @@ WATCHER_DECISION_ENGINE_OPTS = [ 'used for RPC calls'), cfg.ListOpt('notification_topics', default=['nova.versioned_notifications', - 'watcher.watcher_notifications'], + 'watcher.watcher_notifications', + 'openstack.notifications'], help='The exchange and topic names from which ' 'notification events will be listened to. ' 'The exchange should be specified to get '