492 Commits

Author SHA1 Message Date
Gauvain Pocentek
244a90278b Fix the notifier example
The notifier should be instantiated using messaging.Notifier, not
notifier.Notifier.

Change-Id: Id1930df6b758b292a7591e2e4cba2ef5a313a3cb
2014-06-22 09:47:02 +02:00
Jenkins
e0730983ee Merge "Set correct group for matchmaker_redis options" 2014-06-20 20:08:34 +00:00
Jenkins
a64692689a Merge "Add an optional timeout parameter to Listener.poll" 2014-06-20 18:50:16 +00:00
Ihar Hrachyshka
38c1f26102 Set correct group for matchmaker_redis options
Before the change, config generator put those options into DEFAULT
section.

Change-Id: I1e8e746cde4627ddf79632ce8255e268de8bd3c3
Closes-Bug: 1332588
2014-06-20 19:03:35 +02:00
Jenkins
830b00d11c Merge "replace string format arguments with function parameters" 2014-06-20 15:51:58 +00:00
Jenkins
023e5e43f6 Merge "Explicitly name subscription queue for responses" 2014-06-20 15:31:32 +00:00
Christian Berendt
409108c74f replace string format arguments with function parameters
There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.

Change-Id: I4a7ce6916aefb2f2d445f0ebd977c824b1c51e24
Partial-Bug: #1321274
2014-06-20 14:18:40 +01:00
Jenkins
99afe32345 Merge "Removes contextlib.nested" 2014-06-20 12:47:24 +00:00
Jenkins
88800137b4 Merge "Transport reconnection retries for notification" 2014-06-20 10:20:24 +00:00
Jenkins
03e13b5878 Merge "Disable connection pool in qpid interfaces tests" 2014-06-20 10:20:18 +00:00
Jenkins
1b4d7ad6f2 Merge "Cleaned up references to executor specific RPCServer types" 2014-06-19 19:14:36 +00:00
Jenkins
b8009466ce Merge "Add an example usage of RPCClient retry parameter" 2014-06-19 18:53:40 +00:00
Mehdi Abaakouk
9a079d816a Removes contextlib.nested
This change removes usage of contextlib.nested that is not
python 3 compatible

Change-Id: Id69b4112a1bbfe06a53dd68ed94f15fd1d58ba74
2014-06-18 18:41:33 +02:00
Mehdi Abaakouk
1ea9c35ab4 Transport reconnection retries for notification
This patch add support of reconnection retries for the
messaging notifier.

Related bug #1282639
Change-Id: Ia30331f8306ff0f6952d83ef42ff8bee6b900427
2014-06-18 18:41:33 +02:00
Mehdi Abaakouk
e349c5e6f2 Disable connection pool in qpid interfaces tests
This change disables the connection pool in qpid interfaces tests to
ensure that each tests are isolated.

Closes bug: #1331459

Change-Id: Ib4a49be9f605dda5f2cbcbade3851345866e5797
2014-06-18 18:41:33 +02:00
OpenStack Proposal Bot
d3adde6b97 Updated from global requirements
Change-Id: I71fd4b1292d68279d75569dc022745b75da66eab
2014-06-18 16:11:34 +00:00
Jenkins
ebf3a2e765 Merge "Fix the notify method of the routing notifier" 2014-06-18 16:03:55 +00:00
Jenkins
4d9e250482 Merge "Add check credentials to log message if rabbmitmq closes socket" 2014-06-17 15:49:30 +00:00
Jenkins
b60a460baf Merge "zmq: switch back to not using message envelopes" 2014-06-17 00:04:52 +00:00
Aaron Rosen
bf281aace5 Add check credentials to log message if rabbmitmq closes socket
If one has the credentials misconfigured for rabbitmq currently the following
error message is shown: "AMQP server on 10.0.0.23:5672 is unreachable:
Socket closed. Trying again in 1 seconds. " This is confusing because the
problem is the login creditentials are wrong but the server can be reached.

Since the rabbmitmq server allowed the initial connection and closed the
socket it's likely an authenication issue. This patch now logs: "AMQP server
10.0.0.23:5672 closed the connection. Check login credentials: Socket closed"
to hint the user that it could be a credential issue.

Change-Id: Iadff35d88a9cf704c1edd2d5036a113966db3ea3
Closes-bug: 1325750
2014-06-16 17:03:15 -07:00
Mehdi Abaakouk
cbbb90e28c Fix the notify method of the routing notifier
The notify method of the routing notifier don't have the correct
signature and change the case of the priority.

This change fixes it.

Change-Id: I833b19d0c054c94b861a4f6cc263c3487fa0e544
Closes-bug: #1316681
2014-06-16 16:18:37 +02:00
Jenkins
f2cd28e503 Merge "rabbit/qpid: remove the args/kwargs from ensure()" 2014-06-14 23:20:15 +00:00
Jenkins
f471daa8f0 Merge "Add transport reconnection retries" 2014-06-14 23:20:12 +00:00
Jenkins
8843f9d031 Merge "Bump hacking to 0.9.x series" 2014-06-14 19:45:12 +00:00
Mark McLoughlin
d7b85a1492 rabbit/qpid: remove the args/kwargs from ensure()
Having an *args list following the retry kwargs just screams:

  SyntaxError: non-keyword arg after keyword arg

but we don't actually pass any args to methods invoked via ensure() so
these are just unused and can be removed. If we did want them in future
we could just use functools.partial().

Change-Id: Idef12bbc94d39c84ee06ddd6d743f3d2f705a8d1
2014-06-13 16:16:18 +01:00
Mark McLoughlin
2cdf9ec5ff Add an example usage of RPCClient retry parameter
Change-Id: Ib88870b312721deff0d9b6db2ba2e3cb99da6038
2014-06-13 15:42:00 +01:00
Mehdi Abaakouk
948c05417c Add transport reconnection retries
When a rpc client try to make a RPC call and the server is unreachable
The rpc call hang until the server come back.

In most case this is the desired behavior.

But sometimes, we can prefer that the library raise an exception after a
certain number of retries.

For example in ceilometer, when publishing a
storage.objects.incoming.bytes sample from the Swift middleware to an
AMQP topic, you might not want to block the Swift client if the AMQP broker
is unavailable - instead, you might have a queueing policy whereby
if a single reconection attempt fails we queue the sample in memory and
try again when another sample is to be published.

This patch is the oslo.messaging part that allow this.

Closes bug #1282639
Co-Authored-By: Ala Rezmerita <ala.rezmerita@cloudwatt.com>

Change-Id: I32086d0abf141c368343bf225d4b021da496c020
2014-06-13 16:21:59 +02:00
Victor Stinner
7fe2ef7334 Add an optional timeout parameter to Listener.poll
For asynchronous programming, a timeout parameter is required on the listener
to allow to stop it at exit. poll() returns None on timeout.

It plan to use it in my new asyncio (Trollius) executor:
https://review.openstack.org/#/c/70983/

See also the related blueprint for the rationale:
https://wiki.openstack.org/wiki/Oslo/blueprints/asyncio

Change-Id: I918ae3c267743a0eaed1d6a210c79fb4a0eb8733
2014-06-13 10:20:39 +02:00
Jenkins
7d927e5e10 Merge "Removes unused config option" 2014-06-13 03:39:31 +00:00
Davanum Srinivas
d0254b736e Bump hacking to 0.9.x series
In order to keep this patch to just a requirements bump, ignore new and
stricter hacking rules that are being triggered. Fixing up the code and
turning these on is out of scope of this patch and is for future patches.

Change-Id: I5711e066da1076486d291bc4f45359ecb26e1b1a
2014-06-12 09:53:40 -04:00
Jenkins
08310d403e Merge "Setup for translation" 2014-06-12 08:21:06 +00:00
Mehdi Abaakouk
5ded2dad06 Removes unused config option
This change removes the unused 'allowed_rpc_exception_modules' options

Change-Id: Ibb30709e5a3a08573fc1975fab80498a27b5ef0f
2014-06-11 11:13:09 +02:00
Jenkins
290fd75dac Merge "Remove amqp default exchange hack" 2014-06-10 20:31:42 +00:00
Andreas Jaeger
0630c0577b Setup for translation
To start translation, we need to initially import the
translation file - and place it at the proper place so that
the usual CI scripts can handle it.

The proper place is for all python projects
$PROJECT/locale/$PROJECT.pot - see setup.cfg.

Further imports will be done by the OpenStack Proposal bot.

Setup also setup.cfg with the usual babel commands and add the default
babel.cfg file.

Change-Id: I583e98fac2f9b84cd1115640b936057ad95957e8
2014-06-05 22:48:44 +02:00
OpenStack Proposal Bot
ea989b8f95 Updated from global requirements
Change-Id: I6a2fe617cab3370b13de3e45f52076e53d260724
2014-05-28 19:20:05 +00:00
Mehdi Abaakouk
f4da213539 Remove amqp default exchange hack
This change remove the hack to set the default exchange of a transport in the
amqp driver, by removing the usage of the configuration object to get the
default exchange in rabbit and qpid driver, and instead use the value
passed to the driver constructor into all amqp publishers and consumers
class/method that needs it.

Closes-bug: #1256345
Change-Id: Iba54ca79a49f8545854205c1451b2403735c1006
2014-05-28 14:12:30 +02:00
Christian Berendt
c0fde47499 remove default=None for config options
In the cfg module default=None is set as the default value.

Change-Id: I5de0c1ddeeaccde8183ec130c85524f5b57f6f74
Closes-Bug: #1323975
2014-05-28 09:08:51 +02:00
Ihar Hrachyshka
51c9b47c33 Cleaned up references to executor specific RPCServer types
In oslo.messaging design phase, it was planned to introduce executor
specific RPCServer types though they were never implemented. References
to those types sneaked into docstrings from the original design
document. Since we're not going to implement those types now, docstrings
should be updated accordingly.

Change-Id: Ic4017bb8f89d47115bb7dc59483e81d26c76212b
2014-05-26 14:39:53 +02:00
Mehdi Abaakouk
78b498de23 Make the TransportUrl hashable
The amqp connection pool uses the Transport Url as key
to track the connection, but currently a different hash can be
returned for the same url.

This change fixes the hash method of the TransportUrl

Change-Id: Id701d6a80a909d6bd6dabe680c2b8e09dd721ef1
Closes-bug: #1316891
2014-05-24 12:30:21 +02:00
Christian Berendt
a6200c0a00 debug level logs should not be translated
According to the OpenStack translation policy available at
https://wiki.openstack.org/wiki/LoggingStandards debug messages
should not be translated. Like mentioned in several changes in
Nova by garyk this is to help prioritize log translation.

Change-Id: I4af4a45a56b1364a2f5196b75cff299d607ab393
Partial-Bug: #1317950
2014-05-20 22:57:36 +02:00
Gordon Sim
25f3d9acc3 Explicitly name subscription queue for responses
This prevents response queues being abandoned but still bound to
the exchange with the same key as the newer queue.

Change-Id: Iee0465010a1c6d00e96fb672505688a0f763f86c
Closes-Bug: 1318742
2014-05-20 14:27:06 +01:00
Jenkins
84887ccee3 Merge "Use a for loop to set the defaults for __call__ params" 2014-05-15 22:29:07 +00:00
Jenkins
9d645400a0 Merge "Enable log messages to handle exceptions containing unicode" 2014-05-09 17:25:18 +00:00
Jenkins
17375f41ce Merge "Full support of multiple hosts in transport url" 2014-05-05 15:46:34 +00:00
Jenkins
7bfefc0e4f Merge "Fix passing envelope variable as timeout" 2014-05-05 14:25:29 +00:00
Jenkins
7245df4546 Merge "Remove dependent module py3kcompat" 2014-05-02 18:52:37 +00:00
Jamie Lennox
194ed6b973 Fix passing envelope variable as timeout
The envelope variable is being passed positionally in the timeout spot.

Change-Id: I64defdb0a9544d8c2ae69b38f723937b324ae504
2014-05-01 14:13:24 +10:00
OpenStack Proposal Bot
aa8085a470 Updated from global requirements
Change-Id: Ie783701512f121acf9360ea8025e9996c67f41fb
2014-04-30 02:45:47 +00:00
Jenkins
9a322a4ea2 Merge "Synced jsonutils from oslo-incubator" 2014-04-29 22:03:28 +00:00
Ihar Hrachyshka
7ca20f18c5 Synced jsonutils from oslo-incubator
The sync includes change that drastically enhances performance on Python
2.6 with fresh simplejson library installed.

The latest commit in oslo-incubator:
- 732bdb6297eb9de81667f7713ebcb1ccc2ee45a7

Change-Id: Ib3dc0b713ed90396919feba018772243b3b9c90f
Closes-Bug: 1314129
2014-04-29 17:28:01 +02:00