Skip to content

Commit ed613aa

Browse files
author
Balazs Gibizer
committed
Change the default of notification_format to unversioned
The default config `both` means that both the legacy and the versioned notifications are emitted. This was selected as default in the past when we thought that this will help the adoption of the versioned interface while we worked on to make that new interface in feature parity with the legacy. Even though the versioned notification interface is in feature parity with the legacy interface since Stein the projects consuming nova notifications do not have the resources to switch to the new interface. In the other hand having `both` as a default in an environtment where only the legacy notifications are consumed causes performance issues in the message bus hence the bug #1805659. The original plan was that we set the default to `versioned` when the interface reaches feature parity but as major consumers are not ready to switch we cannot do that. So the only option left is to set the default to `unversioned`. Related devstack patch: https://review.opendev.org/#/c/662849/ Closes-Bug: #1805659 Change-Id: I72faa356afffb7a079a9ce86fed1b463773a0507
1 parent 1f74441 commit ed613aa

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

doc/source/reference/notifications.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ notification payload:
113113

114114
There is a Nova configuration parameter
115115
:oslo.config:option:`notifications.notification_format`
116-
that can be used to specify which notifications are emitted by Nova. The
117-
possible values are ``unversioned``, ``versioned``, ``both`` and the default
118-
value is ``both``.
116+
that can be used to specify which notifications are emitted by Nova.
119117

120118
The versioned notifications are emitted to a different topic than the legacy
121119
notifications. By default they are emitted to 'versioned_notifications' but it

nova/conf/notifications.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
help="Default notification level for outgoing notifications."),
5858
cfg.StrOpt(
5959
'notification_format',
60-
default='both',
60+
default='unversioned',
6161
choices=[
6262
('both', 'Both the legacy unversioned and the new versioned '
6363
'notifications are emitted'),
@@ -67,12 +67,14 @@
6767
],
6868
deprecated_group='DEFAULT',
6969
help="""
70-
Specifies which notification format shall be used by nova.
70+
Specifies which notification format shall be emitted by nova.
7171
72-
The default value is fine for most deployments and rarely needs to be changed.
73-
This value can be set to 'versioned' once the infrastructure moves closer to
74-
consuming the newer format of notifications. After this occurs, this option
75-
will be removed.
72+
The versioned notification interface are in feature parity with the legacy
73+
interface and the versioned interface is actively developed so new consumers
74+
should used the versioned interface.
75+
76+
However, the legacy interface is heavily used by ceilometer and other mature
77+
OpenStack components so it remains the default.
7678
7779
Note that notifications can be completely disabled by setting ``driver=noop``
7880
in the ``[oslo_messaging_notifications]`` group.

nova/tests/unit/conf_fixture.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ def setUp(self):
7777
# tests.
7878
self.conf.set_default('keep_alive', False, group="wsgi")
7979

80+
# many tests synchronizes on the reception of versioned notifications
81+
self.conf.set_default(
82+
'notification_format', "both", group="notifications")
83+
8084
config.parse_args([], default_config_files=[], configure_db=False,
8185
init_rpc=False)
8286
policy_opts.set_defaults(self.conf)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
upgrade:
3+
- |
4+
To resolve `bug 1805659`_ the default value of
5+
``[notifications]/notification_format`` is changed from ``both`` to
6+
``unversioned``. For more information see the `documentation of the config
7+
option`_. If you are using versioned notifications, you will need to adjust
8+
your config to ``versioned``"
9+
10+
.. _`bug 1805659`: https://bugs.launchpad.net/nova/+bug/1805659
11+
.. _`documentation of the config option`: https://docs.openstack.org/nova/latest/configuration/config.html#notifications.notification_format

0 commit comments

Comments
 (0)