When failed in connection.reset(), the current code simply
discards the broken connection, without returning a new one
to the pool, nor adjust pool counter. It results in a connection
leak and eventually blocks the thread.
It is fixed by returning a new connection into the pool.
Change-Id: I2b2c23def718d8f2409f9fc415441ac88d40f5b9
Closes-Bug: #1474698
Adjust some docstrings to better align with the class
they are attached to. Also changes some docstrings for
the pooled executor (as it is an abstraction on-top of
async executors, and is not tied to threads anymore) and
correctly denote this on its attributes that others can
and are overriding.
Change-Id: I2eaaeed3aa0ae64eb5c82843381b7518ac508ac1
This code can share the check for eventlet and warn
when the thread module is not patched (which will be
a problem).
When it is not patched the following warning gets
emitted:
"RuntimeWarning: It is highly recommended that when eventlet"
" is used that the ['thread'] modules are monkey patched when"
" using the 'oslo.messaging eventlet executor' (to avoid spurious"
" or unexpected lock-ups and/or hangs)"
This will not be needed once a new futurist release happens
but until then standardize on using that util library to emit
these warnings.
Change-Id: I7277fe19a73d8094a0acf033c75dc881e0d1e533
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names. It also adds a local
hacking check to prevent regressions, while disabling style checks in
the "tests" directory, which will be deleted in a subsequent patch.
The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.
Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.
Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages
Change-Id: Iad2ae13c771c99861ca9493c6ab10edcfbd8684a
Correct the way we check the calls by using the proper mock method. Add
a new test to expand coverage of the area being fixed.
Change-Id: I344ee52dd0ea77bc45b6d3e2713ae1ba8b225ffc
When heartbeat was introduced, it couldn't be enabled by default because
it depended on a minimum kombu version that we couldn't bump to at the
end of the release.
Now that Liberty is open and the minimum required version has been
bumped, I'm enabling heartbeat by default. The threshold this patch uses
is `60` which is the one gotten from tests and other deployments. Lets
make sure this is a sande default before merging the patch.
Change-Id: I21c29c328ef9936e76a215ab15962b46247dadd9
The context manager in the executor fit only for the blocking executor.
Even the dispatcher needs to run code before and after the application
callback, eventlet and future executors have to run the pre/post code
into the main thread and can run the callback into an other thread,
and that force them to run __enter__ and __exit__ manually and deal
the exception path.
This change adds a helper object instead of the context manager.
It is designed to be explicit on what must be executed
before and after the callback and what can be done in a thread or not.
All the executor code is now in the impl_pooledexecutor.py
and use the futures "PoolExecutor" API.
This use futurist to provide a eventlet and aioeventlet futures friendly
object.
Change-Id: I8cd7640f36beeda47560e3c82671bad3530e38d1
Raise an exception if a caller passes a something for the
version that cannot be parsed as a version.
Change-Id: I167849b1bc6c4d946de42c6459b3577a361e9606
Related-Bug: #1467087
In case of a broker restart/failover a reply queue can be
unreachable for short period the IncomingMessage.send_reply
will block for 60 seconds in this case or until rabbit recovers.
But in case of the reply queue is unreachable because the
rpc client is really gone, we can have a ton of reply to send
waiting 60 seconds.
This leads to a starvation of connection of the pool
The rpc server take to much time to send reply, other rpc client will
raise TimeoutError because their don't receive their replies in time.
This changes introduces an object cache that stores already known gone
client to not wait 60 seconds and hold a connection of the pool
Keeping 200 last gone rpc client for 1 minute is enough
and doesn't hold to much memory.
This also don't raise anymore a frightening exception when we can't send reply
to the rpc client. But just logging a info about missing exchange and
a warning about unsend reply.
Closes-bug: #1460652
Change-Id: I928b30c9b5f9ee007532ff703e136640b0e8aaf4
This removes the 2.6 classifier so that support for 2.6
is not noted (when building packages, on pypi...) as happening
anymore for oslo.messaging (since check/gating support for
it has been turned off).
Depends-On: I4013bf38a197c9a9d82b3956ddbd25450d913df9
Change-Id: Ic4150332fff0724e5178e14f91ac54d5a80d408b
Running "pip-missing-reqs" tox target showed these references
in our code. Since we refer to them directly, we should add
them to our requirements.
Depends-On: I0f07858e96ea3baf46f8a453e253b9ed29c7f7e2
Depends-On: I33bd2d9dff9cb7dc1a50177db7286b7317966784
Change-Id: Ie043415f217c0ca71702c41dbec835a2c26ef9cb
Inherit MessageHandlingServer from ServiceBase.
Add the dummy "reset" method to the MessageHandlingServer.
Closes-Bug: #1470484
Change-Id: I4159450f54609c5185146472179d4299fe0c9d30
As per discussions, this patch marks the qpid driver as deprecated. The
removal release has been set to M.
DocImpact
Change-Id: I81f667e0f440ae4e0a7226800a5f99809fc6dce2
There's no need to install qpid-tools and run qpid-config for this case.
The check on the process output should be enough. This also removes
qpid-tools as a dependency for the qpid jobs.
Change-Id: Ie81a2630cb5d593729b18569cc82b83e9817f6ab
The loggin verbosity changed in 0.32 which our gate is pulling from the
updates repository. This patch updates the script to make it work again.
Closes-bug: #1468917
Change-Id: I88a1bc794246beb156d4301bd503fa51a7cd2cce
This change adjusts the exception message to be more in line with the
version compatibility algorithm so as to accurately portray the
problem to the log recipient.
The RPCVersionCapError message can be grossly incorrect when the
requested message's major version is lower than the specified version
cap's major version, declaring the requested message version as too
high, when the real error is that the major versions differ (as major
versions are assumed to be incompatible).
Example:
RPCVersionCapError: Requested message version, 3.23 is too
high. It needs to be lower than the specified version cap 4.0.
Change-Id: Iceef999ed385f2ba77449c568127f50f83d47196
Closes-Bug: 1468525
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.
The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.
Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.
Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages
Change-Id: I05a408b76d4f31b803769a27759e91df770511bb
Rabbitmq's amqp1.0 plugin doesn't have support for vbin8, which is the
default encoding used by qpid-proton. In order to workaround this issue
we should use inferred=True.
Closes-bug: #1465409
Change-Id: Id265917244d7e152c5e13a10df367a3e59de8e50
Now that python-qpid-proton has taken an approach similar to zmq's, it's
possible to install it in boxes where the C libraries are not present in
the system. This patch takes advantage of that to enable amqp protocol's
tests everywhere.
Change-Id: Ibce4c791aafadf45fa876d6a4f5373fde94769ff