Waiting on a threading.Event with eventlet can cause busy looping via
epoll_wait, see related bug for more details.
Change-Id: I007613058a2d21d1712c02fa6d1602b63705c1ab
Related-bug: #1518430
As the first step towards removing rpc_backend, we need all of the test
fixtures to stop setting/using it via ConfFixture.transport_driver. Add
ConfFixture.transport_url, and move the tests over to setting it rather
than transport_driver.
Partial-Bug: #1712399
Change-Id: I6e2ae2b511fdc52790d5755a9aecaf2f427ab706
OpenStack projects should be using mock rather than mox.
oslo.messaging was using mox's stubs via oslotest rather than
mock.patch.object. The code is converted to use mock.patch.object
via fixtures.MockPatchObject.
Change-Id: I19490b4e8211c35b237ebfd38bf2f8b8b44cbf61
We deprecate and change parameter enforce_type's default value
to True[1], so don't need usage enforce_type.
[1] https://review.openstack.org/328692
Change-Id: Ib89cb9bc8afa13e13350e80ec9210ab9e878201f
1.As mentioned in [1], we should avoid using six.iteritems to achieve iterators.
We can use dict.items instead, as it will return iterators in PY3 as well.
And dict.items/keys will more readable. 2.In py2, the performance about
list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: Ia235afc3532f62f265f91ca46d2306c72fc2a2a2
Each config option has limitation for type and value. If we use
method CONF.set_override without parameter enforce_type=True, we
may pass wrong type to config option.
This commit makes sure calling method CONF.set_override with
enforce_type=True.
Change-Id: I1430c93777d6e5d98086a8700663ab9f58c1e5ab
Closes-Bug: #1517839
It's documented, the application consumer must not use wait before stop.
but this is not enforced, so enforce it
Also the code assume start/stop/wait are called from the same thread,
but this is not enforced, so enforce it.
A common broken usage is:
server = oslo.messaging.get_rpc_server(..., executor='eventlet')
t = threading.Thread(target=server.start)
t.daemon = True
t.start()
...foobar code...
server.stop()
server.wait()
With monkey patching, start() will do a context switch and then stop()
is called but start is unfinished, that can cause unexpected behavior.
This patch fixes these issues by making all of this explicit.
Closes-bug: #1465850
Closes-bug: #1466001
Change-Id: I0fc1717e3118bc1cd7b9cd0ccc072251cfb2c038
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