The previous attempt to do this in
Ide40b293c9b9c76aae094950720cead4179ea883 created a new module
oslo/messaging/notify/_impl_test.py which imported the symbols from
oslo_messaging/notify/_impl_test.py. That doesn't actually work, because
the functions to reset the notifications modify the copy of the symbol
in the oslo_messaging package, but the designate tests are still looking
at the copy in oslo/messaging.
This change imports a copy of the module from oslo_messaging in the
oslo/messaging namespace to make certain that the same module object,
and therefore the same global data structure, is used no matter which
path the code is accessed.
The designate team still needs to fix their fixture, but this will let
us release oslo.messaging without breaking their tests in the mean time.
Partial-Bug: #1412812
Change-Id: I629ac57ae1e74bb07e5e98ee2fbc21f8421c3c24
This patch exposes some private symbols used by the tests in nova and
heat.
Change-Id: Ide40b293c9b9c76aae094950720cead4179ea883
Partial-Bug: #1412812
Partial-Bug: #1412841
Some of the heat unit tests import code from a private part of
oslo.messaging. With the namespace package change, that private part was
no longer being exposed. This change introduces the needed module so we
can release oslo.messaging with the namespace changes without breaking
heat, to give the heat team time to update their tests.
Partial-Bug: #1410196
Change-Id: Ib3ea106646f75b17665877b08ccbd382c5698714
Move the public API out of oslo.messaging to oslo_messaging. Retain
the ability to import from the old namespace package for backwards
compatibility for this release cycle.
bp/drop-namespace-packages
Co-authored-by: Mehdi Abaakouk <mehdi.abaakouk@enovance.com>
Change-Id: Ia562010c152a214f1c0fed767c82022c7c2c52e7
When the duration of the timeout timer used in the rabbit driver.is
None and we want that the timer return a maximum of N secs it return None
(infinite) instead of N.
This change fixes that.
Closes-bug: #1408370
Change-Id: I7f4cb3075f776c63aa7dc497173677f92b68c16d
oslo.utils.strutils.mask_password take too much time on
big payload (nova-conductor can receive payload ~ 66k in
largeops jobs for example).
This change removes this logging until we make mask_password
more efficient or we have a smarted the oslo.messaging logging to
not log everything.
Change-Id: Ib1f1d70c5cb820e8ff2de10e6064037808ea1f3a
Closes-bug: #1408362
* add i18n support to some exception messages
* remove the return value of DecayingTimer.start()
Relates to review: I898a236a384b3466147026abc7a1ee21801e8ca1
Change-Id: I7adf5478732f1f46db1009b059b66ff8af6ecdc3
The concurrent.futures module is one of the ways
that async activities can be done in the future,
so we should try to work on getting to that future
by using more futures. To enable this (as well as
to enable getting off eventlet), add a thread pool
based executor which will process incoming messages
using the pool.
Also begins adding according docs as well for the
different types of executors that are available.
Change-Id: I1482fd70abbf69f4e2994597c5e95d91fecb815e
Sanitizes password fields found in lists of dicts for messages
before logging.
This change uses oslo.utils.strutils.mask_password to do it.
Change-Id: I7cd1e53e2ced7ebf9c5942b7a0dbbeb991acab4d
Closes-Bug: #1268459
This change warns the user that it does have monkeypatched the
oslo.messaging library correclty.
Change-Id: Ice80ffc6cbc39919eac4bc0809992daea51b5922
Closes-bug: #1288878
Basic functional and unit tests for zmq driver.
Note as the zmq driver is directly dependent on eventlet, this
change also updates the notify logger tests to remove the
direct dependency on threading which was being monkey patched,
causing test failures.
As the zmq driver has a direct dependency on eventlet, tests are
skipped under py3.
Co-Authored-By: Kapil Thangavelu <kapil.thangavelu@canonical.com>
Co-Authored-By: Edward Hope-Morley <edward.hope-morley@canonical.com>
Change-Id: I93b8b2e92d0f2a353d3357a5e61f6d472ec84944
Partial-bug: #1302941
It's up to the driver to set a suitable timeout for polling the broker,
this one can be different that the one requested by the driver
caller as long as the caller timeout is respected.
This change also adds a new driver listener API, to be able
to stop it cleanly, specially in case of timeout=None.
Closes bug: #1400268
Closes bug: #1399257
Change-Id: I674c0def1efb420c293897d49683593a0b10e291
The qpid driver must always honor the timeout passed the iterconsume
method, this change fixes that.
Related bug: #1400268
Related bug: #1399257
Change-Id: I8f267fc8b5a7abc852f0caf84d1e7c2c342ba951
The iterconsume always set the timeout of kombu to 1 second
even the requested timeout more precise or < 1 second.
This change fixes that.
Related bug: #1400268
Related bug: #1399257
Change-Id: I157dab80cdb4afcf9a5f26fa900f96f0696db502
This change reintroduces the fake_rabbit only for backward compatibility,
but mark it as deprecated.
Now, to use the kombu in-memory driver (that is not thread safe) we must
set the transport_url config option to 'kombu+memory:////" or the
rpc_backend to kombu+memory.
Or we can use the fake driver of oslo.messaging by setting the
transport_url to 'fake:///' or the rpc_backend to 'fake'
This is effectively reverting commit bcb3b23b8f6e7d01e38fdc031982558711bb7586.
Closes-bug: #1399085
Change-Id: I7b6fb3811fc6f695f75ecd350e04e69afd26c428
It is confusing to report that the version cap is too low, rather we
should report that the message version is too high.
Change-Id: Ic37eabb6f211fb68ca567ed4c400a1314e25cc68
This change documents that MessageHandlingServer.wait
the released driver resources associated to this
MessageHandlingServer instance.
Like closing network connections to the broker.
Closes bug: #1397459
Change-Id: I3b0710faeb32ca8e9ee09b14aa1f79290c6061f5
The callback will be used in the new aiogreen executor to support
trollius coroutines.
The change includes an unit test.
Change-Id: I556b112371bec2ec29cea4dc254bb3f9c6d2c07a
Add the missing 's' for the message format and
just print the number queues instead of print a list
full of '<object object at 0xXXXXXXXXXX>'.
Change-Id: Idaab4057bc6a41523a1944ae0c8e15e5e885b390
The iterconsume method of the rabbit driver must
honor timeout parameter when reconnection to the broker
occurs.
Change-Id: I666d818449750c6bae9dde02f519842687a8e4fa
This removes a TODO and also fixes a issue due to the
global state of oslo.config.cfg.CONF.
Closes bug: #1397339
Change-Id: Ib366f35678f899fda93821e6f07897baf8f631b4
Each driver instance must use it's own connection pool.
This removes the last global state of qpid and rabbitmq driver
Make the relation between classes more simple.
The previous behavior was not very safe, as explained in the bug report.
And also, this is a first step to replace this custom connection pool
handling by the kombu one.
Closes bug: #1397925
Partial bug: #1397339
Change-Id: Iecd2b39c76417d9ac081d46810f72eb6e38edfda