932 Commits

Author SHA1 Message Date
Jenkins
d265b49ac3 Merge "[zmq] Restore static direct connections" 2016-12-29 22:54:01 +00:00
Jenkins
1242564e4d Merge "reject when skipping failed messages" 2016-12-26 07:39:49 +00:00
Jenkins
99789d2381 Merge "test_rabbitmq: remove dead code" 2016-12-25 21:44:32 +00:00
ozamiatin
fe6cf0f8a2 [zmq] Restore static direct connections
Restore static direct connections which may be useful
for services running RPC on controllers only and talking
to agents via other means (ssh for example).

Change-Id: Icbe45978cb4a8ba5db74e5593ea7be23cba3f44e
2016-12-24 04:26:19 +02:00
Jenkins
b0507a6bdb Merge "[AMQP 1.0] Setup the amqp1 test environment on ubuntu" 2016-12-23 15:02:36 +00:00
gord chung
85b05a7f2f reject when skipping failed messages
reject is a more accurate action when we are tossing away messages
we cannot handle.

Change-Id: I7f40ac8809f93afb8e518f236d0ddf64a3b241eb
2016-12-21 16:03:24 +00:00
jolie
f1efaf1b6e fix one typo
Change-Id: Ie4ce6e4a8bad8610b40050c94bb3d0796f9f4d2f
2016-12-21 17:52:14 +08:00
Kenneth Giusti
2a9094af5d [AMQP 1.0] Setup the amqp1 test environment on ubuntu
Fixes the amqp1 functional tests so they can be run on Xenial.

Closes-Bug: 1643644
Change-Id: I3e3ee6779a60774ebffc1f45ae5564db934f8eaf
2016-12-19 14:47:04 -05:00
Julien Danjou
fd9f5073c7 test_rabbitmq: remove dead code
This method does not seem to be used by anything.

Change-Id: I71a0a6b12b45a4c7e2c4f301abda5a9cde3e777f
2016-12-19 10:30:51 +01:00
Jenkins
d16e4883fe Merge "Replace mox with mock" 2016-12-17 18:42:26 +00:00
howardlee
de88370982 Replace mox with mock
Replace mox with mock in some files for testing.

See:
https://blueprints.launchpad.net/nova/+spec/remove-mox-ocata

Change-Id: Ic2a3c760d03d19c5a07d71796f24580393102163
2016-12-16 11:24:13 +01:00
Jenkins
c805618d9a Merge "[AMQP 1.0] Simplify the I/O event loop code" 2016-12-09 17:26:34 +00:00
Jenkins
a88637253e Merge "tests: remove useless debug" 2016-12-09 16:57:59 +00:00
Mehdi Abaakouk
2f1ee2f71b tests: remove useless debug
It's useless to print the 250 events

Change-Id: Ib1e05bc20869a0892dfae4b4e45832ebce6373d8
2016-12-09 13:36:21 +01:00
Dmitry Mescheryakov
04f89a76f0 [rabbit] Log correct topic on cast/call
Change-Id: Icc06f7f0f99728fcf4abbdce0bf85af88713494a
2016-12-09 14:24:52 +04:00
Jenkins
92f7bf04a8 Merge "[zmq] Matchmaker redis available time" 2016-12-08 00:06:05 +00:00
Mehdi Abaakouk
37c0ae18dd kafka separate unit/functionnal tests
The kafka functional tests don't use our setup framework but hardcode
the kafka url.

The kafka driver is broken and currently try to be loaded with other
driver tests (and break py3 gate job).

This change remove the hardcoded stuff and uses the normal functional
tests setup to check kafka.

This avoids kafka tests to be ran on other driver tests job.

It also creates the tox target for functional tests and use
pifpaf to setup kafka.

As today, the functional test suite doesn't work all.

Change-Id: Ie6af35321905a04b38e549bf7268dd40543d9e3a
2016-12-07 18:39:36 +01:00
Oleksii Zamiatin
adda657f6c [zmq] Matchmaker redis available time
Use zmq_target_expire rather than zmq_target_update
as it supposed to represent longer period of time so
all services will definitely be updated.

Change-Id: I0b9a1c8cbc7fea9b2c0c543a270dad318d135c1f
2016-12-06 12:14:43 +00:00
Jenkins
044e1bba82 Merge "[zmq] Support message versions for rolling upgrades" 2016-12-06 08:25:30 +00:00
Kenneth Giusti
41e23c2436 [AMQP 1.0] Simplify the I/O event loop code
Leverage the fact that there is never more than one socket active to
simplify the event loop's I/O processing.  This removes the need to
look up active connections.  Also removes the need to query the return
values from select since there is only one socket to process. This
change improves RPC throughput under the simulator by up to 20%

As part of this change I've clarified the code's use of the pyngus
connection by renaming the connection property to something a bit more
specific.

Change-Id: If7c020bb0bd96490af78bc06659db10073b02417
2016-12-05 19:49:06 -05:00
Jenkins
13dffe9913 Merge "Periodically purge sender link cache" 2016-12-05 22:43:56 +00:00
Jenkins
5c08aaeed3 Merge "Use assertGreater(len(x), 0) instead of assertTrue(len(x) > 0)" 2016-12-05 17:09:48 +00:00
Gevorg Davoian
656bc21d34 [zmq] Support message versions for rolling upgrades
Change-Id: I62b001ca396e3a87c061725db55184b2f1f869e3
Closes-Bug: #1524248
2016-12-05 11:50:01 +00:00
Jenkins
9efdc374e8 Merge "Register opts if we're going to check conf.transport_url in parse()" 2016-12-02 18:52:37 +00:00
Oleksii Zamiatin
7cb0683dc6 [zmq] Fix non voting gate jobs
Fix proxy configuration and create a valid transport_url.

Change-Id: I35f22376b8eb75c2cb2175f19435a806f3dca1c1
2016-12-02 17:12:43 +02:00
Mehdi Abaakouk
9d55749c05 Fix transport url with empty port
When transport url is set to something like "amqp://hostname:/"
it currently raise ValueError while any url parsing library
(like urlparse) just ignore the port, and don't fail since this is a
value url.

This change make the transport url ignore empty port instead of raising
ValueError.

Change-Id: I04df76012e3b133eddbcf365363cd261d277e369
2016-12-02 10:06:30 +00:00
Jenkins
7f2299f7e9 Merge "Remove ordering assumption from functional test" 2016-12-02 09:46:43 +00:00
Mehdi Abaakouk
9d1b90c7f5 Remove ordering assumption from functional test
oslo.messaging doesn't ensure ordering of notification. By chance
that works for some driver/setup. But for example zmq job often
fail this one.

This changes removes this assumption.

That fixes the zmq gate job

Change-Id: I2087f0a219a4a5b8fb30bb8ed84e1a72f8d9e0ab
2016-12-02 07:21:05 +01:00
Andrew Smith
3c9c97603f Periodically purge sender link cache
Closes-Bug: 1640266
Change-Id: Id38b756792f8fb14803bc9ead69e1fc903b9eea5
2016-12-01 10:31:56 -05:00
Jenkins
294f17507c Merge "[zmq] Fix zmq-specific f-tests from periodic hangs" 2016-11-30 15:31:58 +00:00
Jenkins
626c27def5 Merge "[doc] Fix three typos" 2016-11-29 02:07:50 +00:00
Dan Smith
485986d5ae Register opts if we're going to check conf.transport_url in parse()
In TransportURL.parse(), a classmethod, we expect conf.transport_url
to be accessible if a url is not passed in. However, since the
_transport_opts are not registered yet, that will fail, which is
a pretty easy case to hit if we're constructing our TransportURL
for the first time on startup.

This registers the opts if we're likely to hit it.

Change-Id: Id94bc0a7fec3ce536e134d4f162ac253a775b238
2016-11-28 14:16:39 -08:00
Jenkins
d13ccf2114 Merge "[zmq] Send fanouts without pub/sub in background" 2016-11-28 16:05:20 +00:00
Atsushi SAKAI
081a5fb10e [doc] Fix three typos
olso => oslo

Change-Id: I44dcc86cd6b50017a30393749e458507bea016f7
2016-11-28 21:14:31 +09:00
Gevorg Davoian
7b841040c9 [zmq] Fix zmq-specific f-tests from periodic hangs
Change-Id: Ie7f7b5a61229db80194a26bc0cefa45e2a7614a9
2016-11-25 17:05:13 +02:00
Jenkins
fbfb0812e3 Merge "[sentinel] Move master/slave discovering from __init__" 2016-11-24 15:36:04 +00:00
Gevorg Davoian
feefead288 [zmq] Send fanouts without pub/sub in background
Change-Id: Ibfab90bb1dac06cd54671bc9a358927b3519ce63
2016-11-24 11:27:50 +00:00
gecong1973
82dac687c6 Use assertGreater(len(x), 0) instead of assertTrue(len(x) > 0)
assertGreater provides a nicer error message if it fails.

Change-Id: I17d6393ec151a7881786a119dcfa3925c936a0f6
2016-11-24 16:16:22 +08:00
Li-zhigang
ea8fad47a5 Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using six.iteritems to achieve iterators.
We can use dict.items instead, as it will return iterators in PY3 as well.
And dict.items/keys will more readable. 2.In py2, the performance about
list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Ia235afc3532f62f265f91ca46d2306c72fc2a2a2
2016-11-23 09:02:14 +00:00
Jenkins
1346a5e830 Merge "Document the transport backend driver interface" 2016-11-22 21:07:35 +00:00
ozamiatin
da0e10657b [zmq] Fix configuration for functional gate job
Currently zmq functional gate jobs run the same configuration zeromq
for all three configurations zeromq/zeromq-proxy/zeromq-pub-sub while
locally if we run

tox -e py27-func-zeromq-proxy (or pub-sub or zeromq)

the proper one will run.
Gate job has to work similarly to what we have in local testing.

Change-Id: I94342be65564665faf27d8d01ae6650183146874
Closes-Bug: #1643929
2016-11-22 17:37:22 +02:00
Kenneth Giusti
adf4cd9d05 Document the transport backend driver interface
Add detailed documentation to the driver API to help driver developers
create drivers that behave consistently.  Specifically prescribes a
set of operational characteristics that a driver must conform to in
order to provide consistent behavior across different implementations.

Change-Id: Icb251ee724f9a0ac4fede702a367910de4ba95e3
2016-11-22 08:11:22 -05:00
Jenkins
3f393e521c Merge "Fix a docstring typo in impl_pika.py" 2016-11-18 11:15:25 +00:00
melissaml
aaed30fe93 Fix a docstring typo in impl_pika.py
TrivialFix

Change-Id: I266fe9898ef4427c1fd75771ad752cde8e13e9ea
2016-11-18 15:03:49 +08:00
Kirill Bespalov
9ea5f18bb8 [sentinel] Move master/slave discovering from __init__
Move from __init__ any redis hosts discovering, because
at the first few seconds of sentinel starting no master
or slave are synced and in this case the constructor
of MatchmakerSentinel may thrown MasterNotFoundError
or SlaveNotFoundError exception that kills openstack
service at the starting (nova/neutron).

Change-Id: I3f0e0cb13072e438224675055678fc8cee913961
2016-11-14 19:12:16 +03:00
Dmitry Mescheryakov
9c25485adb rabbit: on reconnect set socket timeout after channel is set
Currently we set it before the channel and as a result nothing
happens, only an error is logged at the debug level.

Change-Id: Ifebdd957d403e47039c10f7e55c4e7ef08fba658
Closes-Bug: #1640773
2016-11-10 15:04:30 +03:00
Gevorg Davoian
c9b5e474b5 [zmq] Don't create real matchmaker in unit tests
Change-Id: I72c83959eef92aa26b1ff362dcea115bb8d006f8
Closes-Bug: #1640209
2016-11-08 19:22:29 +02:00
Jenkins
f1a1f54b24 Merge "rabbit: Avoid busy loop on epoll_wait with heartbeat+eventlet" 2016-11-08 12:56:44 +00:00
ChangBo Guo(gcb)
0b075aa40a Remove useless logging import statements
TrivialFix

Change-Id: I0bcefbe144903b45d71e053162066d6d4bc91936
2016-11-08 10:11:13 +08:00
Jenkins
9dcd9b78be Merge "[zmq] Cleanup changes to zmq-specific f-tests" 2016-11-07 19:42:49 +00:00