Commit Graph

2577 Commits (c01b03e87c66e964100d3d56d91b0f5f045e6190)

Author SHA1 Message Date
Zuul c01b03e87c Merge "Update master for stable/train" 2019-10-10 12:09:24 +00:00
Pierre Riteau b36c1529f1 Fix spacing in help message
Change-Id: Ie622b8a39514f87b60ff2e801843c5e3c06106e7
2019-10-03 14:10:28 +02:00
Zuul 7734ac1376 Merge "Align message serialization between drivers" 2019-09-30 09:26:11 +00:00
pengyuesheng b72922670f Update the constraints url
For more detail, see

Change-Id: Ie0b54914f5ca45f4888eb1cf8faac36f87e45535
2019-09-23 16:20:21 +08:00
Balazs Gibizer d8980bfed8 Align message serialization between drivers
Every in tree driver that implements RPC send uses jsonutils.dumps to
serialize the message, except FakeDriver. FakeDriver uses json.dumps.
However json.dumps is a lot more strict than jsonutils. This caused
nova to introduce test specific changes in the rpc handling [1].

This patch makes sure that each driver uses the same json serialization.

I've tried to dig in to the history of the strictness of the
FakeDriver. That driver with the json.dumps() call was added back in
2013 with e2b74cc9e6. (I cannot link to
that commit in any online way but it is in my local git clone.)
Checking out that commit I don't see any other drivers present in the
repo but the code does mention drivers like RabbitDriver and ZmqDriver
in oslo.messaging/openstack/common/messaging/ but only there.

Today the oslo_messaging._drivers.common.serialize_msg() call is used
to do the final serialization of the message. It uses jsonutils.dumps
since Icd54ee8e3f5c976dfd50b4b62c7f51288649e112 which is a revert of
I0e0f6b715ffc4a9ad82be52e55696d032b6d0976 that changed from
jsonutils.dumps to jsonutils.dump_as_bytes by mistake. And before this
back and forth it was jsonutils.dumps since the code was imported from
oslo-incubator by I38507382b1ce68c7f8f697522f9a1bf00e76532d. Here
I lost the trail. Honestly I don't know the reason why the fake driver
was made stricter than the real drivers. Still I think today the
strictness is unnecessary as every driver uses jsonutils and even
counterproductive as in [1].

[1] 09bf71407f/nova/compute/ (L820)

Change-Id: I186305b7897a2a4ce033c11ab9e6bc028854381b
Closes-Bug: #1529084
2019-09-21 14:53:29 +02:00
OpenStack Release Bot 92ec6ec93e Update master for stable/train
Add file to the reno documentation build to show release notes for

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on

Change-Id: I99e73a88a654b27cbd9334974413daf9e4a30e5d
Sem-Ver: feature
2019-09-20 16:34:26 +00:00
Matt Riedemann 440357d740 Fix help text for heartbeat_in_pthread option
Change-Id: Ibc40ad1ddedbe04d6ba614467a78e43b3aa6348d
2019-09-18 10:30:14 -04:00
Gabriele b7e9faf659
Add the mandatory flag for direct send
With this feature, the server will raise and log a Message Undeliverable
exception. So it is possible to log immediately an error in case the
reply queue does not exist for some reason.

This is part of blueprint transport-options
The blueprint link is [1]
Please follow the link [2] to use and test the feature.


Change-Id: Iac7474c06ef425a2afe5bcd912e51510ba1c8fb3
2019-08-21 14:46:59 +02:00
Hervé Beraud b56380654a Introduce RabbitMQ driver documentation
Introduce a RabbitMQ driver documentation for admin.

- some RabbitMQ and AMQP specifications (exchanges, queues, routing-key)
- the heartbeat specification and the type of used threads
- the driver options

Change-Id: I8fd1624834510f8dee81ab9342c708d726b8f827
2019-08-08 17:59:56 +02:00
Zuul 1541b0c7f9 Merge "Allow users run the rabbitmq heartbeat inside a standard pthread." 2019-08-08 15:50:07 +00:00
Hervé Beraud 22f240b82f Allow users run the rabbitmq heartbeat inside a standard pthread.
This is an experimental feature.

The proposed changes will fix related issues when we run
heartbeat under apache/httpd enviornment with the apache MPM `prefork`
[1] engine and mod_wsgi or uwsgi in a monkey patched environment.

Propose changes to allow user to choose to run the rabbitmq health check
heartbeat in a standard python thread.


We facing an issue with the rabbitmq driver heartbeat
under apache MPM `prefork` module and mod_wsgi when nova_api monkey
patched the stdlib by using eventlet.

nova_api calling eventlet.monkey_patch() [2] when it runs under mod_wsgi.

This impacts the AMQP heartbeat thread,
which is meant to be a native thread. Instead of checking AMQP sockets
every 15s, It is now suspended and resumed by eventlet. However,
resuming greenthreads can take a very long time if mod_wsgi isn't
processing traffic regularly, which can cause rabbitmq to close the AMQP

Root Cause

The oslo.messaging RabbitMQ driver and especially the heartbeat
suffer to inherit the execution model of the service which consume him.

In this scenario nova_api need green threads to manage cells and edge
features so nova_api monkey patch the stdlib to obtain async features,
and the oslo.messaging rabbitmq driver endure these changes.

I think the main issue here is that nova_api want async and use eventlet green
threads to obtain it.


We want to allow user to isolate the heartbeat execution model
from the parent process inherited execution model by passing the
`heartbeat_in_pthread` option through the driver config.

While we use MPM `prefork` we want to avoid to use libevent and epoll.

If the `heartbeat_in_pthread` option is given we want to force to use the
python stdlib threading module to run the
rabbitmq heartbeat to avoid issue related to a non "standard"
environment. I mean "standard" because async features isn't the default
config in mostly case, starting by apache which define `prefork` is the
default engine.

This is an experimental feature, we can help us to ensure to run heartbeat
through a classical python thread



[2] 3c5e2b0e9f

Change-Id: If8846599efc48fe18ecfb99c04e2c38f9a45b9ed
2019-08-07 17:17:02 +02:00
Ben Nemec 39196a4e90 Fix nits on kafka compression help text
There is no need to explicitly list the choices in the help text.
The oslo.config sample generator will include the choices automatically[0]

Also tweaks the wording of text to make it clear that it is the allowed
values which vary based on kafka version.

Change-Id: I4116e8871436097dea650f56e7b187358367d92e
0: 2488c1e1ce/oslo_config/ (L263)
2019-08-06 19:00:24 +00:00
Zuul dfc8fe9a8f Merge "Support kafka message compression" 2019-08-05 15:53:35 +00:00
root 042caf8a53 Correcting typo in acknowledge spelling
There is a typographical errors in Correcting spelling
from acknowlege to acknowledge.

Change-Id: I4a80d8c6b162a99176eadb052f6201dc38dbc5f9
2019-07-30 13:17:07 +05:30
Zuul 002ac1453b Merge "Use default exchange for direct messaging" 2019-07-26 09:35:06 +00:00
Zuul a5276be3dc Merge "Bump the openstackdocstheme extension to 1.20" 2019-07-22 15:12:22 +00:00
Zuul 46cdd88358 Merge "doc: Cleanup admin docs" 2019-07-19 08:26:04 +00:00
pengyuesheng 33dc529c37 Bump the openstackdocstheme extension to 1.20
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.

Change-Id: Ib5e22f6a5374f05e576bbc00a209209fdb09acad
2019-07-19 11:24:08 +08:00
Zuul cbdc5df3eb Merge "Blacklist sphinx 2.1.0 (autodoc bug)" 2019-07-18 09:35:03 +00:00
Zuul f7eb82a1e4 Merge "Implement mandatory flag for RabbitMQ driver" 2019-07-11 16:45:55 +00:00
Corey Bryant 1c31abc7bc Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:

Change-Id: I699a3ee210c4b45018566b520eaf641e0e582362
Story: #2005924
Task: #34234
2019-07-05 14:47:53 -04:00
pengyuesheng 515a2d79ef Blacklist sphinx 2.1.0 (autodoc bug)
See for upstream details

Change-Id: I648dd4d4a98a3d423c98d28c193737cffe1a2c49
2019-07-05 10:16:48 +08:00
Oleg Bondarev 6fe1aec1c7 Use default exchange for direct messaging
Lots of exchanges create problems during failover under high
load. Please see bug report for details.

This is a step 2 patch.

Step 1 was: only using default exchange
when publishing.
Step 2 is to update consumers to only listen on default exchange,
happening now in T release.

Change-Id: Ib2ba62a642e6ce45c23568daeef9703a647707f3
Closes-Bug: #1789177
2019-07-04 19:47:25 +04:00
Stephen Finucane f0eee1e16b doc: Cleanup admin docs
Use a sensible header style, fix some syntax highlighting, and generally
tidy things up.

Change-Id: I0b141b968ed8db10ff41a626569dd185edbdc641
Signed-off-by: Stephen Finucane <>
2019-07-04 14:50:57 +01:00
Gabriele c50076b4ef
Implement mandatory flag for RabbitMQ driver
With this feature it is possible to use the mandatory RabbitMQ
mandatory flag.

Implements: blueprint transport-options (point 3)

The blueprint link is [1]

Please follow the link [2] to use and test the feature.


Change-Id: Ie269fc08ba80c4b94a24a8207c1e86c19c3b3fcb
2019-07-01 21:38:32 +02:00
Zuul 6cdd4cb007 Merge "Implement the transport options" 2019-06-26 13:09:53 +00:00
Gabriele e804874c50
Implement the transport options
With this feature, it is possible to specialize the parameters to send.
`options = oslo_messaging.TransportOptions(at_least_once=True)`

TransportOptions is used in every single driver,
for example in RabbitMQ driver is used to handle the mandatory flag.

  - The idea of creating a new  class TransportOptions is because I'd like
    to have an abstract class not related only to the RPCClient
  - at_least_once is the first parameter, when needed we can add the

Implements: blueprint transport-options (second point)

The blueprint link is [1]
To test it you can use [2]


Change-Id: I1858e4a990507d3c2bac2ef7fbef75d8c2dbfce2
2019-06-24 16:50:35 +02:00
Kenneth Giusti 73c0c0071e Add the "transport_options" parameter to the amqp1 and kafka drivers.
Change-Id: I5ca6ec2cb30b8d7f18e1770f80024957bc029bf3
2019-06-20 16:12:39 -04:00
zhang-shaoman 9a752862e2 Support kafka message compression
When the message is large, in order to improve the efficiency of
kafka, we need to compress the message before send it, so we need to
support kafka message compression.

Change-Id: I9e86d43ad934c1f82dc3dcf93d317538f9d2568e
Implements: blueprint support-kafka-compression
2019-06-20 11:18:35 +08:00
Zuul b8c3a1ea59 Merge "fix typos" 2019-06-18 17:59:06 +00:00
Hervé Beraud 54356899da fix typos
Change-Id: Id11db4113c9b1c3add602192c1e915218704ef27
2019-06-18 14:00:14 +02:00
Zuul 03ec779cdf Merge "Download kafka from" 2019-06-18 04:37:26 +00:00
Zuul e7420afa2f Merge "Add transport_options parameter" 2019-06-17 16:35:55 +00:00
Gabriele 83266cc6ea
Add transport_options parameter
With this new parameter is possible to pass other parameters
from the client to the drivers.
So it is possible to tune the driver behavior.

For example can be used to send the mandatory flag in RabbitMQ

  - The transport_options parameter is not actually used (yet).
  - This part of blueprint transport-options  (first part)

Implements: blueprint transport-options
The blueprint link is

Change-Id: Iff23a9344c2c87259cf36b0d14c0a9fc075a2a72
2019-06-14 15:47:39 +02:00
Ben Nemec 70b03bcf83 Download kafka from
It seems that versions are deleted from pretty quickly.
They stick around longer on so we won't have to
be constantly chasing the latest version in our functional tests.

Change-Id: I047edac67699dd598f8dfd0f859b3772f6068bd3
2019-06-10 15:35:43 +00:00
Zuul e45dfa7ea2 Merge "Add help msg to payload for CLI notifier" 2019-06-10 13:40:49 +00:00
Gabriele da6caaef07 Add thread name to the RabbitMQ heartbeat thread
With this information it is easier to debug the application.

Change-Id: Icafae894ede54d8e802aef556e4239408cc23bcd
2019-05-24 22:03:40 +02:00
Hervé Beraud 1a860467bd Add help msg to payload for CLI notifier
Change-Id: I3d712ecfcea00ece0180108c585c858795fd2bce
2019-05-23 18:52:19 +02:00
Zuul fe0ac3195e Merge "Fix switch connection destination when a rabbitmq cluster node disappear" 2019-05-20 21:05:57 +00:00
Kenneth Giusti 4f467fbd73 Cap Bandit below 1.6.0 and update Sphinx requirement
Bandit 1.6.0 accidentally changed how the exclusion list option is
handled and breaks our use of it. Cap to the previous version until
Bandit has fixed the problem.

Sphinx 2.0 no longer works on python 2.7, so we need to start
capping it there as well.

Change-Id: Ie6b379f2c99862c37891ac03c52464e07bc2b2cc
2019-05-14 10:46:32 +02:00
Hervé Beraud 9d8b1430e5 Fix switch connection destination when a rabbitmq cluster node disappear
In a clustered rabbitmq when a node disappears, we get a
ConnectionRefusedError because the socket get disconnected.

The socket access yields a OSError because the heartbeat
tries to reach an unreachable host (No route to host).

Catch these exceptions to ensure that we call ensure_connection for switching
the connection destination.

POC is available at

    $ git clone
    $ cd rabbitmq-oslo_messging-error-poc
    $ python -m virtualenv .
    $ source bin/activate
    $ pip install -r requirements.txt
    $ sudo podman run -d --hostname my-rabbit --name rabbit rabbitmq:3
    $ python $(sudo podman inspect rabbit | niet '.[0].NetworkSettings.IPAddress')

And in parallele in an another shell|tmux
    $ podman stop rabbit
    $ # observe the output of the script we now call ensure_connection

Now you can observe some output relative to the connection who is
modified and not catched before these changes.

Related to:

Closes-Bug: #1828841

Change-Id: I9dc1644cac0e39eb11bf05f57bde77dcf6d42ed3
2019-05-13 17:09:04 +02:00
Zuul 40c25c2bde Merge "Remove log translation and i18n" 2019-05-04 22:31:13 +00:00
Zuul 55e8fd009c Merge "Replace URLs with URLs" 2019-05-03 18:42:20 +00:00
Zuul 558fc5f4e8 Merge "Consider the topic parameter as an array in client-notify" 2019-04-29 22:36:42 +00:00
jacky06 9b7bcbda2f Replace URLs with URLs
Change-Id: Ib4a523adf3275a8727d5a4f2a149e163a81be3cc
2019-04-26 10:31:26 +08:00
Hervé Beraud 4f385720d7 Remove log translation and i18n
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

Change-Id: I9ddb6595fc52e46ed8844e39d2fa71029c90b65c
Closes-Bug: #1674567
2019-04-24 11:55:38 +02:00
Zuul 433d34ed41 Merge "Retry to declare a queue after internal error" 2019-04-22 22:23:07 +00:00
Zuul 78777a92b8 Merge "Handle unexpected failures during call monitor heartbeat" 2019-04-22 22:11:48 +00:00
OpenDev Sysadmins 815ea9ac98 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at with any
questions you may have.
2019-04-19 19:31:51 +00:00
Zuul d4873f983b Merge "Dropping the py35 testing" 2019-04-18 01:14:36 +00:00