2032 Commits

Author SHA1 Message Date
Jenkins
f1d3dbd068 Merge "Add Constraints support" 2016-11-24 23:48:56 +00:00
Jenkins
fbfb0812e3 Merge "[sentinel] Move master/slave discovering from __init__" 2016-11-24 15:36:04 +00:00
Tony Breeds
78f1137805 Add Constraints support
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove oslo.messaging.

Change-Id: I8be883215f27abb58d15b85e8542cbdf32000bac
2016-11-23 20:32:32 +11: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
Jenkins
587749d856 Merge "Updated from global requirements" 2016-11-10 14:49:25 +00: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
OpenStack Proposal Bot
8efe0bea31 Updated from global requirements
Change-Id: Ib8c1fa32298caf654d706a839a23f605989e0a48
2016-11-09 23:03:04 +00: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
Jenkins
2b72c43642 Merge "Remove useless logging import statements" 2016-11-08 12:56:29 +00:00
Jenkins
23c8e6d6cb Merge "update srouce doc pika_driver.rst the charactor then to than" 2016-11-08 06:33:15 +00:00
Jenkins
50f0de4a9f Merge "This patch cleans up the 'notification_listener.rst' documetion by removing some class which don't exist and adding some function which exist in current source." 2016-11-08 04:47:28 +00:00
wanglmopenstack
f9eebeef21 update srouce doc pika_driver.rst the charactor then to than
update srouce doc pika_driver.rst the charactor
the word:more then shoud be more than

Closes-Bug: #1639995

Change-Id: I41460492c4503cf395c93b0bf643ccb98f4e12c3
2016-11-07 19:26:25 -08: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
Jenkins
2fc381816b Merge "[zmq] Refactor receivers" 2016-11-07 19:42:45 +00:00
John Eckersberg
a6c193f3eb rabbit: Avoid busy loop on epoll_wait with heartbeat+eventlet
Calling threading.Event.wait() when using eventlet results in a busy
loop calling epoll_wait, because the Python 2.x
threading.Condition.wait() implementation busy-waits by calling
sleep() with very small values (0.0005..0.05s).  Because sleep() is
monkey-patched by eventlet, this results in many very short timers
being added to the eventlet hub, and forces eventlet to constantly
epoll_wait looking for new data unecessarily.

This utilizes a new Event from eventletutils which conditionalizes the
event primitive depending on whether or not eventlet is being used.
If it is, eventlet.event.Event is used instead of threading.Event.
The eventlet.event.Event implementation does not suffer from the same
busy-wait sleep problem.  If eventlet is not used, the previous
behavior is retained.

Change-Id: I5c211092d282e724d1c87ce4d06b6c44b592e764
Depends-On: Id33c9f8c17102ba1fe24c12b053c336b6d265501
Closes-bug: #1518430
2016-11-07 12:09:38 -05:00
Gevorg Davoian
b1081f9e81 [zmq] Refactor receivers
Change-Id: I19e1dd05fee4323b14bbe377e5e36a37d0f815ac
2016-11-07 13:51:43 +00:00
Gevorg Davoian
ac58423860 [zmq] Cleanup changes to zmq-specific f-tests
Change-Id: Icce92106a0a0a07a4f2d19fe8bcd7c2a6fa530c8
2016-11-07 13:51:37 +00:00
OpenStack Proposal Bot
c961ba9295 Updated from global requirements
Change-Id: I195d860b550aeff473c1779fb83ed0cfc650cdf6
2016-11-06 02:05:50 +00:00
ericxiett
b1866630de This patch cleans up the 'notification_listener.rst' documetion
by removing some class which don't exist and adding some function
which exist in current source.

Change-Id: I1aa78db34051dd554bfdb81e9e24378cbf7f0ea3
Closes-Bugs: #1637930
2016-11-05 13:34:49 +08:00
Jenkins
dd99f7b1e6 Merge "Remove the temporary hack in code" 2016-11-04 22:20:10 +00:00
Gevorg Davoian
cf0c18a214 Remove nonexistent functions from documentation
This patch cleans up the documentation by removing some functions
which don't exist anymore and cause sphinx warnings. The patch also
adds pika_driver to index.rst.

Change-Id: I23908089ef6ad1f05c78521c2eea3a0a3276eb2a
Closes-Bug: #1639171
2016-11-04 14:54:37 +02:00
Jenkins
cf5e3685f1 Merge "Replace retrying with tenacity" 2016-11-03 18:05:42 +00:00
Jenkins
bb740f5a58 Merge "[simulator] Fix transport_url usage" 2016-11-03 16:59:29 +00:00
Gevorg Davoian
90125aa885 Replace retrying with tenacity
This patch replaces the legacy retrying library with the newer
and more convenient tenacity one, taking into account that:
1) retrying uses milliseconds for wait times, but tenacity uses seconds;
2) retrying has a lot of numeric arguments for specifying behaviour
of decorated functions, while tenacity has a few of them, which are
specialized objects, thus making the retry-decorator more flexible.

Change-Id: Ib6ecffe5d1cf292badbb9eb6db6260f17460f343
Closes-Bug: #1635399
2016-11-03 12:36:57 +00:00
OpenStack Proposal Bot
b1b3677a75 Updated from global requirements
Change-Id: I1358feb2f87821e8a18ac8b77461df57fa2a6168
2016-11-02 22:00:00 +00:00
OpenStack Proposal Bot
3efbdc703e Updated from global requirements
Change-Id: I8dced43299478078afb75c71b187b7f0607276ad
2016-10-27 12:21:15 +00:00
zhangshengping2012
e40f6398f9 Remove the temporary hack in code
remove the temporary hack in code amqpdriver.py

Change-Id: I7ba9666fc15a6fc4ab27b04362e94661c00547c5
2016-10-26 12:19:51 +08:00
Jenkins
7b5bec3133 Merge "[zmq] Don't fallback to topic if wrong server specified" 2016-10-21 14:15:45 +00:00
Jenkins
c50f1b6440 Merge "Change assertTrue(isinstance()) by optimal assert" 2016-10-21 14:15:40 +00:00
Jenkins
42ece46a72 Merge "Update .coveragerc after the removal of respective directory" 2016-10-21 08:39:44 +00:00
Jenkins
d7e5ffc04b Merge "Using assertIsNone() instead of assertEqual(None)" 2016-10-21 04:03:59 +00:00
Jenkins
379fd82e55 Merge "[TrivialFix] Fix typo in oslo.messaging" 2016-10-20 19:34:47 +00:00
melissaml
e5aceb351c Using assertIsNone() instead of assertEqual(None)
Following OpenStack Style Guidelines[1]:
http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
[H203] Unit test assertions tend to give better messages for more specific assertions.
As a result, assertIsNone(...) is preferred over assertEqual(None, ...)

Change-Id: I192e339fadc6b738714697d1ae8673ebfb7abd79
2016-10-20 23:48:36 +08:00
melissaml
b28b2875c9 Change assertTrue(isinstance()) by optimal assert
Some of tests use different method of
assertTrue(isinstance(A, B)) or assertEqual(type(A), B).
The correct way is to use assertIsInstance(A, B) provided
by testtools

Change-Id: I0d2ec8ff3be41afb871ebd2aa71a8dfd13e2076d
2016-10-20 23:18:28 +08:00
ozamiatin
c9732d5d3b [zmq] Don't fallback to topic if wrong server specified
When target is specified with server name the correct
result is empty if there is no records with this precise
name registered.

Change-Id: Ibaa7c23c633ccc5f2ca428deb022c9fc1d00e8e7
2016-10-20 11:52:00 +03:00
howardlee
56c48c65a5 [TrivialFix] Replace old style assertions with new style assertions
Replace 'assertEqual(None, ...)' with 'assertIsNone(...)'.
Replace 'assertTrue(a in b)' with ''assertIn(a, b).
Replace 'assertFalse(a in b)' with 'assertNotIn(a, b)'.

Change-Id: Ia13cb8465ec86c07867ef977f8ab0d0fdbabb1d4
2016-10-20 03:22:47 +00:00
howardlee
7f2341b3cf [TrivialFix] Fix typo in oslo.messaging
replace 'MessageDispostionTask' with 'MessageDispositionTask'

Change-Id: I3278cc70e2f7a08611a0596adbfca5106d2197c0
2016-10-20 09:02:13 +08:00
Jenkins
267ac50fd6 Merge "[simulator] Fix a message length generator usage" 2016-10-19 19:30:41 +00:00
Jenkins
b453b0a4a9 Merge "[sentinels] Fix hosts extracting and slaves usage" 2016-10-19 17:03:08 +00:00
Jenkins
2cc646bb48 Merge "[zmq] SUB-PUB local proxy" 2016-10-19 15:36:19 +00:00
Kirill Bespalov
401102daab [simulator] Fix transport_url usage
1) Remove hardcoding 'redis' matchmaker from any zmq:// transport because it's
   fails in cases zmq+etcd:// or zmq+sentinel:// urls.
2) Allow to use transport_url from config file by removing default value for
   args.url option. In this case by default args.url is None and
   transport_url will be used from config file.

Change-Id: I1edcabe46b1e92dd4e6eccc9151b50d03f394186
2016-10-19 14:13:29 +03:00
Kirill Bespalov
6eb57b4d5f [simulator] Fix a message length generator usage
Do initialization of the generator only for rpc/notify clients.
No needs to load messages_length.yaml and calculate distribution for servers.

Change-Id: Ib1ac30181bec20eacf6d29ccd5f76c0b6b1e96f8
2016-10-18 14:51:19 +03:00