1601 Commits

Author SHA1 Message Date
Jenkins
5ad18f73c5 Merge "Fix typo passend should be passenv" 2016-03-22 00:21:04 +00:00
Jenkins
54051687c1 Merge "Add a py34 functional test for rabbit" 2016-03-21 22:52:14 +00:00
Davanum Srinivas
2fb5ad9b36 Fix typo passend should be passenv
Looks like a typo. It should be passenv as mentioned in
tox docs:
https://testrun.org/tox/latest/config.html

Change-Id: I14a18ec5b6c53ad4931b144ef66916563047cde6
2016-03-21 17:36:15 -04:00
Jenkins
39910533fc Merge "Small fixes" 2016-03-21 19:09:44 +00:00
Jenkins
e376bf9948 Merge "Do not leak Listeners on failover" 2016-03-21 16:07:53 +00:00
Davanum Srinivas
dad52c1fe2 Add a py34 functional test for rabbit
fix up post_test_hook.sh so we can pass in py34 in
zuul definitions.

Change-Id: Ibc695762fb12b60a8094be187001dd2bd42f402e
2016-03-21 11:55:44 -04:00
Dmitriy Ukhlov
50b5468109 Small fixes
1) Typos in log messages
2) Change LOG.warn -> LOG.warning
3) Fix names of varibles
4) Stop logic of RPC reply listener fixed

Change-Id: Icf4579f25f32f65428a3e7e6383bf8b1e34a6fa6
2016-03-21 14:25:39 +00:00
Jenkins
0dbeba1c6a Merge "Use only unique topics for the Kafka driver" 2016-03-21 14:25:33 +00:00
Jenkins
fa9b1864ea Merge "[zmq] Refactoring consumer side" 2016-03-21 14:25:21 +00:00
Ilya Tyaptin
bec4ef4d12 Use only unique topics for the Kafka driver
Consumer in Kafka driver should use only unique topic,
otherwise a FetchDuplicate exception will be raised.

Change-Id: I569ce446eaf05dbc3a7fd0b41a2307e940ab87fb
Closes-bug: #1555081
2016-03-21 15:06:24 +03:00
Oleksii Zamiatin
1385df6181 [zmq] Refactoring consumer side
* Introduce ZmqNotificationServer
* Implement single listener per target

Change-Id: I874c3fa6a86d3110a2145bea8ad06ca0bbd522c7
2016-03-21 12:50:50 +02:00
Ilya Tyaptin
d3fedf8624 [Kafka] Ensure a topics before consume messages
Currently we trying ot fetch messages from the topics even
they have bot been created yet. This behaviour causes a
KafkaConfigurationError which are raised in the kafka driver.

Change-Id: I78cfd5ac24fbf37be5649232d0bc825319cf6402
Closes-bug: #1557521
2016-03-21 11:59:12 +03:00
Jenkins
f0d251d19d Merge "Missing version parameter in can_send_version()" 2016-03-17 07:06:02 +00:00
dukhlov
0aca222d96 Fix problems during unstable network
In this patch start and stop method is not raised exceptions
if connectivity problem is detected. Rasing exceptions there
exceptions are not expected by MessageHandlerServer.
It hangs server on start

Closes-Bug: #1553168

Change-Id: I891abab2a1184fa65b496ea2f7fc54894bc0b421
2016-03-16 07:14:19 -04:00
Jenkins
41851e9c8a Merge "Explicitly exclude tests from bandit scan" 2016-03-15 11:17:58 +00:00
Javeme
89bc0e6ef2 Missing version parameter in can_send_version()
Change-Id: I1afadaabe908df4d66c94d36539c7380e424c186
Closes-Bug: #1554996
2016-03-15 13:04:19 +08:00
Jenkins
0faa76da56 Merge "Bump rabbit_transient_queues_ttl to 30 mins" 2016-03-14 17:40:19 +00:00
Jenkins
9ecac96e2e Merge "Pika: fix sending fanout messages" 2016-03-14 12:40:22 +00:00
Davanum Srinivas
b6a8d51e6c Bump rabbit_transient_queues_ttl to 30 mins
In I83a8d09dc0cdae24c12d7043ec810529a9ce57ab, we
made reply and fanout queues expire instead of auto-delete
and set the rabbit_transient_queues_ttl to 10 mins.

In grenade, we seem to see the queues expiring just around
the time the new side is coming up which causes havoc. There
is no reason the rabbit_transient_queues_ttl should not be
higher. So let's bump up the expiry to 30 mins.

Closes-Bug: #1545002
Change-Id: I70a29b762198129fe0a3e904d9f2a7d4242b322c
2016-03-14 07:23:55 -04:00
Jenkins
7f6303aea6 Merge "Simulator: store results in JSON format" 2016-03-13 22:41:46 +00:00
Jenkins
3f6daa8b77 Merge "Simulator: calculate message latency statistics" 2016-03-13 22:36:26 +00:00
Jenkins
d348790921 Merge "Fix Notification listener blocking behavior" 2016-03-13 22:33:56 +00:00
Eric Brown
0f58e2317c Explicitly exclude tests from bandit scan
Now that the bandit linter runs without a bandit.yaml specified,
it should exclude the tests directory similar to how it did before
in the bandit.yaml.

The reason this has not caused a problem yet is because bandit is
still finding a config bandit.yaml in .tox/pep8/etc/bandit/bandit.yaml.
But in a newer version of bandit this will not be the case.

Change-Id: I6cdceaff2aa906e813f1d1e993f60e66358946ee
2016-03-12 20:03:32 -08:00
Jenkins
4ea1ade893 Merge "Replace deprecated LOG.warn with LOG.warning" 2016-03-12 03:40:27 +00:00
Davanum Srinivas
fb73297112 Fix Notification listener blocking behavior
Add a sleep() to allow other threads (like the one collecting
the stats) to run.

Closes-Bug: #1555632
Change-Id: I6fcb63c10acd76f2815e23fbd303f08974feb993
2016-03-11 12:15:52 -05:00
Jenkins
cc89fc3174 Merge "Revert "Ensure the json result type is bytes on Python 3"" 2016-03-11 14:25:05 +00:00
Gevorg Davoian
f2f2d07c28 Pika: fix sending fanout messages
This patch fixes the problem of sending fanout messages to listeners
located on the same host via the pika transport driver. Only one
listener per host received a fanout message before, because actually
there was only one queue per host, and that queue simply dispatched
incoming messages to listeners in a round robbin manner. In order to
fix this behaviour, every listener is supplied by its own unique
message queue bound to an appropriate fanout exchange now.

Since internal states of pika listeners (or pollers) were changed,
some tests related to pika pollers were also updated properly.

In addition, terms related to sending fanout messages to all_servers
listening some topic are refered to all_workers now (for better
description of what is really going on).

Closes-Bug: #1551661
Change-Id: I5aab6bee8758658fa3fa7e329b54ffa438e85f61
2016-03-11 12:29:53 +02:00
Jenkins
5972b2310f Merge "test: Don't test message's reply timeout" 2016-03-11 10:16:58 +00:00
Victor Stinner
bb4121a465 Revert "Ensure the json result type is bytes on Python 3"
This reverts commit bd81d09c02c5bc8561ad04de91802a5c1917d9e9.

I understand that the change was supposed to fix something, but instead it broke all tests on Python 3!?

It's wrong to replace blindly json.dumps() with jsonutils.dump_as_bytes(). In oslo messaging, the result is usually used as a value in a dictionary, and then the whole dictionary is passed to a second serializer which also serialize to JSON.

Sorry, I don't understand everything, but at least I see that tests passed on py3 before the change, and started to fail with the change.

Maybe json(utils).dumps() is misused in some places, but in this case, you should write a change which only fix these specific places, not replace all calls to dumps().

Change-Id: Icd54ee8e3f5c976dfd50b4b62c7f51288649e112
2016-03-11 09:00:08 +00:00
Swapnil Kulkarni (coolsvap)
6d2d1b2cfe Replace deprecated LOG.warn with LOG.warning
LOG.warn is deprecated. It still used in a few places.
Updated to non-deprecated LOG.warning.

Change-Id: I124357c259e3cc6c1c8f4cad48c6cb19c1ac2a77
Closes-Bug:#1508442
2016-03-11 12:49:35 +05:30
Jenkins
67c8987372 Merge "Ensure the json result type is bytes on Python 3" 2016-03-11 04:10:35 +00:00
Ilya Shakhat
55882795f0 Simulator: store results in JSON format
This patch introduces new parameter --json <file name>.
When it is specified the simulator stores stats in JSON file.

Change-Id: I0b7a87ee614f44baa920569fe0c7046269c90925
2016-03-10 19:23:35 +03:00
Jenkins
955088bc19 Merge "Always delete exc_info tuple, even if reply fails" 2016-03-10 12:44:20 +00:00
Ilya Shakhat
84109fe8fc Simulator: calculate message latency statistics
Calculate message latency: for RPC calls on both server-side and
on client-side (round-trip); for RPC cast and NOTIFY on server-side
only.

The message is extended with metadata: sequence id, creation time,
reception time and return time (for RPC calls). For every message
the metadata is stored into MessageStatCollector. To reduce memory
consumption the collector aggregates stats on every second and can
print the ongoing stats to stdout. At the finish the overall stats
are printed.

NOTIFY tests are changed to be similar to RPC:
 * use pre-generated messages
 * parameter "-w WAIT_BEFORE_ANSWER" for processing delay
 * parameter "--requeue" to re-queue new messages (only those that
   miss the cache)

Change-Id: I4c2fc11bfaee17b6825cdc7d6edf07b8e91ef83a
2016-03-10 13:52:58 +03:00
Jenkins
8028b4d9fb Merge "Fallback if git is absent" 2016-03-05 14:42:38 +00:00
Jenkins
7c01d54f4f Merge "Simulator: always use random messages for time-bound tests" 2016-03-05 14:42:32 +00:00
Jenkins
a642ccdf25 Merge "Simulator: implement own random generator instead of scipy" 2016-03-05 14:40:05 +00:00
Joshua Harlow
0774b5ceba Always delete exc_info tuple, even if reply fails
Avoid any possible references to exc_info tuple by ensuring
we delete it in a finally block, so that even if replying or
logging fails somehow the prior exception is always deleted
correctly.

Change-Id: Id0e5099b9b38b1803bb4514f7cf3deae760d5ac3
2016-03-04 11:52:34 -08:00
Kenneth Giusti
33f1a3bf8a Do not leak Listeners on failover
This fixes the case where two listeners subscribed to the same topic
fail to reestablish themselves after broker failover.  This was due to
a leak where one listener 'overwrote' the other in the driver.

Change-Id: I83822e28c3f15eed639c31891efae222b1ef3de8
Closes-Bug: #1553206
2016-03-04 10:47:07 -05:00
Jenkins
5b75f39676 Merge "Simulator: fix batch-notify-server command" 2016-03-04 15:09:03 +00:00
Ilya Shakhat
37c0db5769 Simulator: always use random messages for time-bound tests
When the test is time-bound the simulator should use as many random
messages as possible.

Change-Id: I1e112d9ff0c3f1281b544f05d25eff2d3912fd6c
2016-03-03 13:57:41 +03:00
Davanum Srinivas
4e4caf67da Fallback if git is absent
When building packages if git is absent, then we should
fall back to a safe default.

Closes-Bug: #1552251
Change-Id: I9731416117de088282259846d49c2ec3ce09d1dc
2016-03-02 16:27:14 -05:00
Ilya Shakhat
97385ef5b5 Simulator: implement own random generator instead of scipy
Dependency on scipy results in extra requirements to the system
(include the need of Fortran compiler). With this patch the
weighted random choice algorithm is implemented directly.

Change-Id: I60cbc6c452945000add5a65263d1ab4e42dd91f9
2016-03-02 19:06:16 +03:00
Ilya Shakhat
d2496c34d9 Simulator: fix batch-notify-server command
This patch fixes the name of parameters used to construct
batch notification listener

Change-Id: I8eae9494943b2592c9cf4b92fccca93eab3b8e93
2016-03-02 18:28:11 +03:00
Jenkins
9db1cc728c Merge "Work with kombu from upstream" 2016-03-02 15:04:14 +00:00
Jenkins
363c591ffb Merge "Fail quickly if there on bad password" 2016-03-02 08:54:10 +00:00
Davanum Srinivas
0de6bd6be5 Work with kombu from upstream
Fix a test case that breaks with latest kombu. we mock
the close for the in-memory transport as the newer code
closes connection aggressively (it's doing the right thing)
which ends up with a test failure.

Closes-Bug: #1550630
Change-Id: I8956837a2ecd8ccd858dceac7b99a0f34351603c
2016-03-01 18:11:39 +00:00
Davanum Srinivas
97655c1fe6 Fail quickly if there on bad password
Inspired by:
https://bugs.launchpad.net/oslo.messaging/+bug/1508512/comments/1

Add authentication_failure_close capability on the client to
tell the server that it can send us connection.close command
indicating ACCESS_REFUSED as the reasona. If this capability is
absent then authentication failures are reported in the legacy
fashion: by abruptly closing the network connection.

Partial-Bug: #1508512
Change-Id: Icf6108678256e6f922620837c71f8827fe8e8c52
2016-02-29 18:30:46 -05:00
ozamiatin
76ab2c4f62 [zmq] Dynamic port range is ignored
If we specify the default range to pyzmq function,
means default values are the same as pyzmq default values
we fallback to bind-0 system call which is not appropriate
for us as it binds in maximal range > 1024.

https://github.com/zeromq/pyzmq/blob/master/zmq/sugar/socket.py#L212

Change-Id: Idacd99d83c8fb9ad222a7bda187fa67a9b0348da
Closes-Bug: #1550104
2016-02-29 16:55:35 +02:00
Jenkins
ed84711596 Merge "[zmq] Implement Response and Envelope classes" 2016-02-27 16:14:33 +00:00