1104 Commits

Author SHA1 Message Date
OpenStack Proposal Bot
a06e152da9 Updated from global requirements
Change-Id: I2c6205d9e8483c7c3b792b54458e585800c0b4e5
2015-07-22 05:07:52 +00:00
Doug Hellmann
1b390c34b0 add plugin documentation for executors and notifiers
Document the plugins available for executors and notifiers.

Fix the formatting in the aioeventlet executor so the docstring renders
properly.

Change-Id: I7709b65f5aa68fab3822b4de11640309aa07b1d7
2015-07-20 18:30:00 +00:00
Mehdi Abaakouk
d94d6d6892 Allows to change defaults opts
This change introduces to possibility for the consumer application
to change the default oslo.messaging config options.

Same API interface as oslo.db have been taken.
The first option is executor_thread_pool_size.

This option was called rpc_thread_pool_size, but because it's used by
notification and rpc 'executor_thread_pool_size' looks a better name.

Changing executor_thread_pool_size default will be useful for ceilometer
the default of 64 is really to small to consume many notifications at
once for batching them. When is clearly sufficient for rpc stuffs.

Change-Id: Iea0d7a72e38d27c600403c815258aa5eee0d0c8c
2015-07-20 15:37:16 +02:00
Jenkins
10bc6244aa Merge "Update 'impl_eventlet' docstring to reflect actual impl." 2015-07-19 16:20:27 +00:00
Jenkins
431f22cfa5 Merge "Fix amqp connection pool leak in ConnectionContext" 2015-07-18 02:50:23 +00:00
Davanum Srinivas
adcd0807d6 Allow a forward slash as a part of the user/password
quote method has a safe parameter which is set to '/' so when
the end user has a / in the rabbit_password then we end up leaving
that in the url which ends up looking like:

amqp://stackrabbit:pass/word@10.0.0.9:5672//

Which is clearly invalid, so we should set safe parameter to '' which
allows the url to be constructed properly (see transport.py
TransportURL.__str__ method works this work)

Closes-Bug: #1474933
Change-Id: I14fb54440d0925f3676e18d13182ed0fa9c34ca2
2015-07-17 22:26:00 -04:00
Joshua Harlow
cb210cecb7 Update 'impl_eventlet' docstring to reflect actual impl.
Change-Id: I6131fe747c5fb4ef6319a9c22ce029ba7a8e0268
2015-07-17 12:42:20 -07:00
OpenStack Proposal Bot
6c6efe78ca Updated from global requirements
Change-Id: I86096675bad3e9f5c6f9321b7bb71d34aaeb6e1e
2015-07-17 16:16:54 +00:00
Jenkins
b9e7623c30 Merge "Don't install pyngus on Python 3" 2015-07-17 13:50:23 +00:00
Jenkins
1203df8f9f Merge "tests: adjusts an expected time for gate" 2015-07-17 12:16:57 +00:00
Jenkins
6af082ac42 Merge "Remove oslo namespace package" 2015-07-17 09:19:03 +00:00
Mehdi Abaakouk
91705a1d91 tests: adjusts an expected time for gate
Sometimes the gate fails because a test take a bit more time than
expected, this change adjusts this.

Closes-bug: #1475502
Change-Id: I7396c9de82aab18e84c0e08cc1f6f0903884130a
2015-07-17 11:07:59 +02:00
Jenkins
02c020b27e Merge "Ensure callback variable capture + cleanup is done correctly" 2015-07-17 08:42:02 +00:00
OpenStack Proposal Bot
3e78c1bffa Updated from global requirements
Change-Id: I849a458367c822435f226318462ddda5c8c356be
2015-07-16 23:19:51 +00:00
Joshua Harlow
02a3a39814 Ensure callback variable capture + cleanup is done correctly
It appears the the callback variable that was being called on
future done was not the right one, due to the lambda capture
mechanism referring to a lazy variable which would potentially
be a different callback by the time the future would finish so
make sure we capture the right one and ensure the future has access
to it.

This adds a helper method that submission will go through
to ensure that the callback variable is correctly captured
in the created lambda and also ensures that the incomplete futures
list is cleaned up (when the future is done).

The notification listener tests use now eventlet to show up this
issue that doesn't occur with blocking executor.

Closes-bug: #1474943

Closes-bug: #1475307

Change-Id: I23e393d504662532572b5b344b87387be6d7bcb1
2015-07-16 22:05:58 +00:00
Doug Hellmann
03265410e0 Remove oslo namespace package
Blueprint remove-namespace-packages

Depends-on: I2eeef93ee2e61a721c69f62add819f93f62f077d
for openstack/ceilometer
Depends-on: I26390dd908769be5f1a5b70be22d3b98e3a45563
for openstack/ceilometermiddleware
Depends-on: Ifa8baab33cdb3e606cf175a8c29c3a4ef6c44480
for openstack/glance
Depends-on: I029c3260051aa48cfaae428c096c1ac7b43b2bd2
for openstack/ceilometermiddleware

Change-Id: I8c5595bbafa82db33f62fa47d214f5cb756a2639
2015-07-16 17:47:16 +00:00
OpenStack Proposal Bot
01254d1891 Updated from global requirements
Change-Id: I2dab32141f0e661ebd62eeb3fc0eba5912186b6a
2015-07-15 20:44:52 +00:00
Victor Stinner
525e3a2b12 Don't install pyngus on Python 3
pyngus is not compatible with Python 3 yet.

Change-Id: I54431c0a40c46d3027116c07e2bac5cc1ef76a3a
Closes-Bug: #1474852
2015-07-15 15:45:35 +02:00
Oscar Huang
d5780ad357 Fix amqp connection pool leak in ConnectionContext
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
2015-07-15 10:29:24 +00:00
Jenkins
8a9b5d44ae Merge "Executor docstring & attribute tweaks" 2015-07-15 00:56:55 +00:00
Joshua Harlow
c5389bebce Executor docstring & attribute tweaks
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
2015-07-14 15:43:04 +00:00
Jenkins
ead733a2dc Merge "Use the warn_eventlet_not_patched util function" 2015-07-14 10:40:56 +00:00
Joshua Harlow
4df24f7d1c Use the warn_eventlet_not_patched util function
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
2015-07-13 16:32:38 -07:00
Doug Hellmann
857ccabc9c Drop use of 'oslo' namespace package
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
2015-07-13 21:12:35 +00:00
Jenkins
9eef14f1c0 Merge "Make heartbeat the default" 2015-07-13 11:04:14 +00:00
Jenkins
b48487e65b Merge "Don't reply when we known that client is gone" 2015-07-13 11:03:09 +00:00
Jenkins
0969bfcd89 Merge "Verify that version in 'prepare' is valid" 2015-07-13 11:01:24 +00:00
OpenStack Proposal Bot
f04a321076 Updated from global requirements
Change-Id: If67f874c1761018c8cd2fb138cef9f76a69f9934
2015-07-12 15:21:33 +00:00
Jenkins
2fe968c15d Merge "Updated from global requirements" 2015-07-11 04:29:56 +00:00
Jenkins
0055d79ac2 Merge "Remove usage of contentmanager for executors" 2015-07-11 03:19:49 +00:00
OpenStack Proposal Bot
6dda4a751f Updated from global requirements
Change-Id: If68c8e463dc6f2b8118bb66626b5a73d81053b5d
2015-07-10 20:43:19 +00:00
Doug Hellmann
c7b31385ac Fix mock use for mock 1.1.0
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
2015-07-10 12:22:26 +00:00
Flavio Percoco
168f6cc2bb Make heartbeat the default
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
2015-07-09 16:05:17 -07:00
Jenkins
a5e707c2bc Merge "Imported Translations from Transifex" 2015-07-09 15:04:08 +00:00
Mehdi Abaakouk
79b308bc8c Use oslo.log in the zmq receiver
The zmq receiver must allow to be configurable like any other
openstack daemon.

Change-Id: I8db72239d6be04c25bef37a539b7c4ecd457225b
2015-07-09 14:55:25 +03:00
OpenStack Proposal Bot
483296e8d3 Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I854c9b37cbce16903d6119f78b3e3a3123a19497
2015-07-09 06:22:36 +00:00
Mehdi Abaakouk
c49594a62f Remove usage of contentmanager for executors
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
2015-07-08 13:42:10 +02:00
Kevin Benton
ac57114c2d Verify that version in 'prepare' is valid
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
2015-07-07 07:34:12 -07:00
Jenkins
3b891fcfcb Merge "Deprecated impl_qpid" 2015-07-06 17:06:35 +00:00
Jenkins
1d3c39a02e Merge "Imported Translations from Transifex" 2015-07-06 16:48:28 +00:00
Jenkins
456155e318 Merge "Remove py26 artefacts from oslo.messaging code" 2015-07-06 16:48:08 +00:00
Jenkins
c9ae87bb77 Merge "Remove 2.6 classifier" 2015-07-06 12:13:58 +00:00
Mehdi Abaakouk
286659a38b Don't reply when we known that client is gone
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
2015-07-06 13:17:00 +03:00
Jenkins
952fd2d422 Merge "Add WebOb and greenlet to requirements" 2015-07-06 09:57:37 +00:00
Jenkins
d9d325082e Merge "Use ServiceBase from oslo.service as a parent class" 2015-07-06 09:11:02 +00:00
Victor Sergeyev
2734fc8f50 Remove py26 artefacts from oslo.messaging code
If we are not support py26 anymore, we can remove py26 tox environment
and some specific code.

Change-Id: I9b935c0bcbb4ddfd5388ad5ad76c6e7662c9f2fa
2015-07-06 12:04:02 +03:00
Joshua Harlow
7c2aa0ced0 Remove 2.6 classifier
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
2015-07-06 12:02:54 +03:00
OpenStack Proposal Bot
6f63aa9ad7 Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Ia8f191905ce39b849a290862bafd92bbd7b23471
2015-07-06 06:13:34 +00:00
Davanum Srinivas
9ec11b727a Add WebOb and greenlet to requirements
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
2015-07-04 03:59:39 +00:00
Jenkins
8dc5923a98 Merge "Add a missed raise statement" 2015-07-02 16:39:40 +00:00