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
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
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
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
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
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
1) Provide master_group_name as virtual_host in url:
zmq+sentinel://:password@sentinel-a,:password@sentinel-b/master_group_name
2) Use slaves for the read operations like SMEMBERS.
Change-Id: I690ecae4a260feef5425eac1f3f5b0e5cf4bb2d7
Central + local proxies combination optimizes following:
* Makes it possible to shorten the number of TCP connections
to a single subscription from node.
* PUB/SUB limitation of 10k consumers can be bumped up to 10k nodes
not only to 10k services
* Fanout happens in 2 steps therefore central proxy takes less load
and blocks for a shorter period of time since it needs to fanout
to less consumers (local proxies) not directly to every single service.
Change-Id: I57d87bc8310354142ab69a9f2d3e0a0cf5b972b8
When the application set batch_size, so we don't need to prefetch more
messages, especially for notifications. Notifications queues can be
really big when the consumer have disapear during a long period, and
when it come back, kombu/pyamqp will fetch all messages it can. So we
override the qos prefetch value.
Change-Id: I601e10cf94310b9f96f7acb9942959aaafad7994
Closes-bug: #1551667
Avoid blocking the RPC Server thread when it attempts to acknowledge
the RPC request message. Blocking is unnecessary as the acknowledge
command does not return a status and can be processed asynchronously
from the server thread.
Avoiding this context switch improves overall RPC call throughput
according to the simulator tool by approximately ten percent on my
test systems.
Change-Id: I71548eb6f9f7dcaf74cb426d4e9b369b54856419
This patch makes it possible to maintain several redis hosts at
once in order to increase driver's reliability and fault tolerance.
Change-Id: Id6f63a4bb67a39340a74d16144c79028c7af245d
'Notification Listener' doesn't work.
I fixed the example which is described in developer guide to work fine.
These are the main points of this correction.
* specify namespace for NotificationFilter.
* set 2 blank lines between class definitions according to E302 of pep8.
* change argument of 'pool' to keyward arguemnt, because 4th argument of
'get_notification_listener' requires the name of message executor.
Change-Id: I75800309f2294fe9f17ea2a2b1638de57ef2922e
Closes-Bug: #1618394
Releasenote translation publishing is being prepared. 'locale_dirs'
needs to be defined in conf.py to generate translated version of the
release notes.
Note that this repository might not get translated release notes - or
no translations at all - but we add the entry here nevertheless to
prepare for it.
Change-Id: I7f004ff1404281a825f6317d1555bbb32822a971
This patch fixes cast() and RPC replies so they do not block the
caller once the messages have been written to the link. In both of
these cases messages are sent "at most once" with best effort.
If a negative acknowledgment is received a warning is logged.
Change-Id: I84671c62544ec388421ecd0ccafc267c3c3d6087
Closes-Bug: #1630637
This patch provide the sync flag:
simulator.py rpc-client --sync call
simulator.py rpc-client --sync fanout
The --sync values means next:
- call: to send sync msg via rpc.call
- fanout: to broadcast sync msg via rpc.fanout to all servers on topic
When clients has sent all messages, the rpc-server will be stopped
automatically and dump statistics to a file (if --json-file is used).
This is much usefull than rough killing the process of the server in
benchmark frameworks.
Change-Id: I06fd8dbbcdc8b2b9f13029029f730b417ff128ce
If the remote target and the caller have different python
versions, then built-in exceptions raised by the remote target
will not be properly deserialized on the caller. Because of this,
oslo.messaging will simply raise a RemoteError, instead of any
expected exceptions the caller might expect.
This patch addresses this issue.
Closes-Bug: #1630795
Change-Id: I6d9eaf5497e746be9766731172406ec624ef9ba7
This patch moves message sending closer to ack receiving. As a
result we get more uniform load on servers and more reliable
behavior when some proxies suddenly shut down.
Change-Id: I0bc7b94c8259fcaa590c111bc5437520cdd302ef
Decrease the size of the debug log output drastically by removing
debug messages issued for each message. This patch only removes those
log statements that log correct behavior - errant behavior is still
logged for debug.
Change-Id: I1c67e6ed7e503ef3b9543fdfce31b91c46bd851a
* Refactored RoutingTable, in order to work on string target
representation.
* RoutingTableAdaptor - provides usable adaptation of RoutingTable
to use with Target object.
* RoutingTableUpdater - implements asynchronous table updates
from the matchmaker.
* Implemented dynamic connections for DealerPublisherDirect
* Use dynamic connections for direct messages
Change-Id: I20a76c3b2e8f9e71ffcc5ac658fbc659ad4c8153
--debug, --is-cast and --is-fanout are defined as args of type=bool.
This means that, for example, if we want to enable debug logging
level, we have to type '--debug True'. But we can also use
'--debug False' in order to do the same, which is very misleading
(in fact, any non-empty string will evaluate to True). This patch
tries to solve this problem by replacing type=bool and
default=False with action='store_true' for these args, so that
we will be able to enable them (they will remain False by default
as before) simply as '--debug' etc.
Change-Id: I8ee04c35427df446966161491da8d264b44975bf