509 Commits

Author SHA1 Message Date
Jenkins
bfcf122a56 Merge "Fix slow notification listener tests" 2014-06-27 22:36:11 +00:00
Jenkins
944b947fb8 Merge "Fix formatting of TransportURL.parse() docs" 2014-06-27 22:36:04 +00:00
Jenkins
8d71fe2498 Merge "Fix info method of ListenerSetupMixin" 2014-06-27 07:25:18 +00:00
Mark McLoughlin
a7f01d9683 Fix slow notification listener tests
The notification listener tests have a listener endpoint that will stop
the listener thread when a certain number of messages have been
received. If this doesn't work, the main thread will time out its
join() after 5 seconds and the only way sign of this is that the test
took over 5 seconds.

Let's make stop_listener() return a boolean indicating whether the the
thread has stopped or we timed out, and assert that the thread has
stopped.

Fix a few cases where the thread hasn't stopped. In the 'two exchanges'
case, we send three messages but only two are to the exchanges we are
listening on. In the tests using the HANDLED return value, the info()
handler which stops the thread was never been called because that
endpoint was last in the endpoints list.

Change-Id: Iea2486f23cee073c3891188d7aabb22ae945900d
2014-06-27 06:56:47 +01:00
Paul Michali
0cfafac246 encoding error in file
There is a non-printable character (c2a0) in a comment line, which
in a new Neutron test case causes a StringException. There are
three issues here.

1) Encoding issue in the file.
2) No detection of encoding issues in files.
3) Neutron tests mask the failure detail

This addresses the first issue. Bug 1334798 in Neutron was created
for the last issue. Oslo team is aware of the second issue.

Related-Bug: #1334798

Change-Id: I8cfa6c93085a26666a8b4bee06dcd52709d04a95
2014-06-26 18:53:35 +00:00
Jenkins
9c3c717799 Merge "Replace usage of str() with six.text_type" 2014-06-26 15:54:58 +00:00
Thomas Herve
13fc9f251a Fix info method of ListenerSetupMixin
The listener of ListenerSetupMixin had an incorrect info implementation
that couldn't be called properly. This patch fixes the method signature.

Change-Id: I33153f04ce23474cfaffaa1db20b8582befa324d
2014-06-26 17:23:20 +02:00
Mark McLoughlin
89ed1295b5 Add release notes for 1.4.0.0a1
Change-Id: Iaf4ee85100533746ec8b6faa7983a17261eb5392
2014-06-26 10:34:25 +01:00
Mark McLoughlin
da2abaaa06 Fix formatting of TransportURL.parse() docs
Change-Id: I0b2cf7b1e76bd9151957ddaaaaca8d9e11cf1ed5
2014-06-26 06:53:32 +01:00
Aaron Rosen
0102aa96e6 Replace usage of str() with six.text_type
Replace using of str with six.text_type as it's able to
handle unicode data.

Change-Id: I38e4378c490d1dad8020312308dd3b6dad8772c0
2014-06-25 20:08:51 +00:00
Boris Pavlovic
3f9fc44bc6 Fix structure of unit tests in oslo.messaging (part 1)
Even in case of libraries and when they are not big like nova.
It is better to use next rules:

1) structure of tests directory is the same as a root of project
Tests directory will be well organized, and it will be simple to find
where to write tests

2) names for end modules should be test_<name_of_testing_module>.py

Change-Id: Ie13d1b709e863f6a9babaaa2bf1e042ef9251671
2014-06-25 12:20:36 +04:00
Jenkins
68f8857f30 Merge "RPC server doc: use the blocking executor" 2014-06-24 15:09:37 +00:00
Jenkins
1a0a3dd4b9 Merge "Ensures listener queues exist in fake driver" 2014-06-23 16:04:24 +00:00
Jenkins
889bf73021 Merge "Handle unused allowed_remote_exmods in _multi_send" 2014-06-23 09:33:30 +00:00
Mehdi Abaakouk
e582da68f4 Ensures listener queues exist in fake driver
The fanout queues of the fake driver are created at the first executor
poll, but if we use eventlet executor and the fake driver, when the sender
delivers a fanout message before the first poll, the message goes to the
topic queue instead of the server fanout queue.

The changes fixes that by ensuring the all queues exists when the
listener is created.

Closes bug #1331453

Change-Id: I92e7c01dd87d634b741bbcaea92f48730fdd555e
2014-06-23 09:10:21 +02:00
Gauvain Pocentek
221144600a RPC server doc: use the blocking executor
The eventlet executor need additional code to make the RPC server sample
work. Using the blocking executor makes things easier to setup for a
newcomer.

Change-Id: I56dfa54a178962d4ced34e2f15eaf9312b7087cc
2014-06-22 09:48:33 +02:00
ChangBo Guo(gcb)
821ee096a6 Removes the use of mutables as default args
Passing mutable objects as default args is a known Python pitfall.
We'd better avoid this.

Change-Id: I67cc0774a65886ef9fce0b72e52157b622248a85
Closes-Bug: #1327473
2014-06-21 11:41:36 +08: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
Elena Ezhova
210ec5003d Handle unused allowed_remote_exmods in _multi_send
allowed_remote_exmods which is passed to _multi_send method in
impl_zmq.py is not passed further to _call, _cast, etc.

Due to that, all remote exceptions, that are supposed to be
expected, are wrapped into messaging.RemoteError exception with
all details of the remote exception.

To fix this allowed_remote_exmods needs to be passed as a
parameter in a called method().

Change-Id: If1dc2f85eab6f542bc21961b9d5c0bd0ab64add2
Closes-Bug: 1330460
2014-06-16 16:23:11 +04: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