15 Commits

Author SHA1 Message Date
Takashi NATSUME
de31466fdb doc: Fix a parameter of NotificationPublisher
The 'binary' parameter has been changed to the 'source'
since I95b5b0826190d396efe7bfc017f6081a6356da65.
But the notification document has not been updated yet.

Replace the 'binary' parameter with the 'source' parameter.

Change-Id: I141c90ac27d16f2e9c033bcd2f95ac08904a2f52
Closes-Bug: #1836005
2019-07-10 16:13:51 +09:00
Zuul
9762090711 Merge "Change the default of notification_format to unversioned" 2019-06-05 13:10:04 +00:00
Balazs Gibizer
ed613aa66f 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
2019-06-04 10:36:45 +02:00
Matt Riedemann
a4651c4558 Link versioned notification talk into docs
This provides a link to gibi's talk from the Train summit
on versioned notifications in to the reference docs.

Change-Id: I5d0c1fb675bdf2cae699efd733048663e5828699
2019-05-23 22:34:38 +00:00
ZhongShengping
7ecaa3fcf8 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org
counterparts.

Change-Id: I3e0af55e0707f04428a422b973d016ad30c82a12
2019-04-24 13:59:57 +08:00
Matt Riedemann
8856009445 Add docs on what not to include in notifications
Based on bug 1823104 it's clear we should have some
explicit wording in the notification reference docs
about what not to include in versioned notification
payloads, so this change attempts to start that with
the most obvious thing - don't expose access credentials
to the nova deployment.

This also adds a reminder to think about what is being
added / mirrored from internal objects and determine if
consumers really need it and if they aren't asking, opt
to not including it until requested.

Change-Id: I326aa39d963091282a5d0b70ba222abfe8ccfdac
Related-Bug: #1823104
2019-04-04 10:20:32 -04:00
Chen
66c097a979 Revisons on notifications doc
1 typo fixes
2 use :oslo.config:option: elements for nova conf options
3 change '`' to '``' where applicable

Change-Id: Icfebf894185fc83f5fa77e8e10a42ba9dbb37755
2018-08-15 23:40:41 +08:00
Stephen Finucane
dd1a416bc9 doc: Start using openstackdoctheme's extlink extension
This ensures we have version-specific references to other projects [1].
Note that this doesn't mean the URLs are actually valid - we need to do
more work (linkcheck?) here, but it's an improvement nonetheless.

[1] https://docs.openstack.org/openstackdocstheme/latest/#external-link-helper

Change-Id: Ifb99e727110c4904a85bc4a13366c2cae300b8df
2018-05-03 14:34:47 +01:00
Matt Riedemann
11528966ba Document how to disable notifications
This adds information to the "notification_format" config
option help and notifications docs on how to disable notifications.

While updating the config option help text, a stale reference
to Pike is removed.

Change-Id: I736025a0a88fc969831558805687b642da8cd365
Closes-Bug: #1761405
2018-04-16 14:12:12 -04:00
Matt Riedemann
94ca0b9023 Add a note about versioned notification samples being per-release
The example versioned notifications don't have any indication of
which release they are available in, and since people can link to
the 'latest' docs, like in I51d0deffc4f42ff2722a8d21aa6b8c8008c62723,
it's important to note that the samples in the latest docs might not
be in the version of nova one is actually using, e.g. ocata or pike.

So this adds a note that people should be aware of that before
relying on some versioned notification.

Change-Id: I2f7db424f0938667895b51f45ea60862a32e22c1
2017-11-15 20:42:06 +00:00
Balazs Gibizer
0d4c3cc65b Remove dead code of api.fault notification sending
Based on the description of the notify_on_api_faults config option [1]
and the code that uses it [2] nova sends and api.fault notification
if the nova-api service encounters an unhandle exception.
There is a FaultWrapper class [3] added to the  pipeline of the REST
request which catches every exception and calls the notification sending.

Based on some debugging in devstack this FaultWrapper never catches any
exception. Every REST API method is decorated with expected_errors
decorator [5] which as a last resort translate the unexpected exception
to HTTPInternalServerError. In the wsgi stack the actual REST api call is
guarded with ResourceExceptionHandler context manager [7] which translates
HTTPException to a Fault [8]. Then Fault is catched and translated to
the REST response [7]. This way the exception never propagates back to
the FaultWrapper and therefore the api.fault notification is never emitted.

Based on the git history of the expected_errors decorator this notification
was never emitted for v2.1 API and as the v2.0 API now supported with the
same codebase than v2.1 it is not emitted for v2.0 calls either. As nobody
reported a bug I assume that nobody tried to use this notification for a very
long time. Therefore instead of fixing this bug this patch propses to remove
the dead code.

See a bit more detailed description on the ML [9].

[1] 0aeaa2bce8/nova/conf/notifications.py (L49)
[2] 0aeaa2bce8/nova/notifications/base.py (L84)
[3] 0aeaa2bce8/nova/api/openstack/__init__.py (L78)
[5] 0aeaa2bce8/nova/api/openstack/extensions.py (L325)
[7] 0aeaa2bce8/nova/api/openstack/wsgi.py (L637)
[8] 0aeaa2bce8/nova/api/openstack/wsgi.py (L418)
[9] http://lists.openstack.org/pipermail/openstack-dev/2017-June/118639.html

Change-Id: I608b6ebdc69d31eb2a11ac6479fa4f2e8c20f7d1
Closes-Bug: #1699115
2017-10-09 17:29:40 +02:00
Jenkins
fa1ac7d965 Merge "explain payload inheritance in notification devref" 2017-09-06 13:29:59 +00:00
Matt Riedemann
beac1529fd doc: link to versioned notification samples from main index
Notifications are essentially another API for end users, but
it can be hard to find the list of existing notifications or
their samples which are buried deep down via contributors >
technical reference deep dive > notitfications. If I'm an
end user, I'd like to just see them in the same set of links
on the main page as the API, under the "For End Users" section.

Change-Id: If3ca21b080d06a291ed27c9bcd84a566164c3b70
2017-09-01 14:10:14 -04:00
Balazs Gibizer
f6bbd2b5f4 explain payload inheritance in notification devref
During the implementation of I1c8c038078bbe1a5914a92d44b3e977287294a88
we realized that the inheritance used in the notification payload
classes has some drawbacks. When we need to introduce new leaf classes
the content of the nova.obj_name field will change in the emited
payload. This should be avoided if possible. If this cannot be avoided
and the only change is the renaming then the version of the new
payload shall be the same as the old payload was before the rename.
If the renaming involves any other changes on the payload (e.g. adding
new fields) then the version of the new payload shall be higher than
the old payload was.

Change-Id: Ie8c9317892f5593d473067d5dfc300a7e98795c5
2017-07-31 11:03:45 +00:00
Stephen Finucane
83e7763518 doc: Populate the 'reference' section
Per the spec [1]:

  reference/ – any reference information associated with a project that
  is not covered by one of the above categories. Library projects should
  place their automatically generated class documentation here.

There are a couple of documents that focus on nova internals, but won't
necessarily be applicable to user. These are moved here.

[1] specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration

Change-Id: I94614c2383329e1fbed60d9c5aca3fab5170ef8f
2017-07-18 15:41:20 +01:00