1962 Commits

Author SHA1 Message Date
Jenkins
7ad9718395 Merge "Fix a typo in server.py" 2016-10-10 16:39:36 +00:00
Jenkins
3e993aef01 Merge "[zmq] Maintain several redis hosts" 2016-10-10 16:39:21 +00:00
Gevorg Davoian
cb3af2167f [zmq] Maintain several redis hosts
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
2016-10-10 15:13:15 +03:00
Jenkins
06414b1de7 Merge "Properly deserializes built-in exceptions" 2016-10-08 12:28:41 +00:00
melissaml
ea001a874b Fix a typo in server.py
TrivialFix

Change-Id: I550661e58e481e69b2f21600893a20692aa9e9f3
2016-10-08 12:28:12 +08:00
Hiroyasu.OHYAMA
beb23103b0 [document] The example which is written in the developer guide of
'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
2016-10-07 18:07:00 +09:00
Jenkins
6357a45f82 Merge "Remove debug logs from fast path" 2016-10-06 16:50:23 +00:00
hussainchachuliya
4c67917484 Fix whitespace formatting issue
Fix a missing and extra whitespaces issue.

TrivialFix

Change-Id: Ib108db431ee84bdf0a556fb1fc5bcd909a7f06eb
2016-10-06 16:34:43 +05:30
Jenkins
cb13e65bed Merge "[zmq] Fix send_cast in AckManager" 2016-10-06 08:04:52 +00:00
Jenkins
7768b5d8e8 Merge "[zmq] Routing table refactoring, dynamic direct connections" 2016-10-06 02:04:34 +00:00
Claudiu Belu
da830016d5 Properly deserializes built-in exceptions
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
2016-10-05 16:57:55 -07:00
Gevorg Davoian
86f4b80b0c [zmq] Fix send_cast in AckManager
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
2016-10-04 00:27:23 +03:00
Kenneth Giusti
9775ed3cce Remove debug logs from fast path
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
2016-10-03 16:31:35 -04:00
Jenkins
f52e5cfbca Merge "[zmq] Added a processing to handle ImportError in Redis plugin of Matchmaker" 2016-10-03 17:46:36 +00:00
ozamiatin
a5e2a633e3 [zmq] Routing table refactoring, dynamic direct connections
* 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
2016-10-03 16:45:16 +03:00
Gevorg Davoian
e491573654 Fix simulator bool command line args
--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
2016-09-30 12:46:02 +03:00
Jenkins
16820d91b1 Merge "Replace 'the' with 'to' in docstring" 2016-09-29 18:22:04 +00:00
Jenkins
1a52e3a141 Merge "Set the valid choices for the rabbit login methods" 2016-09-29 09:55:19 +00:00
Jenkins
31a544cce6 Merge "[zmq] Remove unused methods from executors" 2016-09-29 07:44:33 +00:00
Jenkins
5c7b5b68de Merge "Remove default=None when set value in Config" 2016-09-29 01:11:50 +00:00
Anh Tran
d1fe205d45 Replace 'the' with 'to' in docstring
Change-Id: Ie3fa917f595e8dbb747b410b2023a9ebd9d2f858
2016-09-29 00:50:27 +00:00
Jenkins
1aa35c1f62 Merge "[zmq] Add acks from proxy for PUB/SUB messages" 2016-09-28 17:08:03 +00:00
Jenkins
f4bacd5261 Merge "[zmq] Refactor consumers and incoming messages" 2016-09-28 16:43:10 +00:00
Jenkins
080df375ca Merge "[zmq] Make second ROUTER socket optional for proxy" 2016-09-28 16:37:56 +00:00
Jenkins
29224e09cd Merge "[zmq] Fix ZmqSocket.send_string" 2016-09-28 13:30:36 +00:00
Luong Anh Tuan
4b1ac84e3f Remove default=None when set value in Config
By default oslo.cfg sets the default values as None [1], There is
no need to explicitly do this.

[1] https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L829

Change-Id: I032f1044ab96b04f0ea1f66762a832c305280522
2016-09-28 00:37:41 +00:00
Gevorg Davoian
22c93b299a [zmq] Add acks from proxy for PUB/SUB messages
Change-Id: I7e870154c7f45dac44a8bd5c6811616292232f04
2016-09-27 16:42:41 +03:00
Gevorg Davoian
2b47281a7e [zmq] Refactor consumers and incoming messages
Change-Id: Ib9b5f1fbc184cc0364e3f742fab7b59bc6a7c03e
2016-09-26 11:49:44 +03:00
ozamiatin
27594bd40f [zmq] Make second ROUTER socket optional for proxy
Since proxy supposed to be used in different configurations
second ROUTER socket may stay unused (e.g. when we use proxy
for publishing only fanout messages in mixed direct/pub-sub
configuration see ZmqClientMixDirectPubSub).

This patch introduces two modes of proxy SingleRouterProxy (where
frontend and backend ROUTERS are the same socket) and
DoubleRouterProxy (different sockets for the frontend and for the
backend - the original behavior).

Change-Id: Ia859b92e1f238fcbbcf42e17b06e0f4ad04e79f6
2016-09-26 11:41:29 +03:00
ChangBo Guo(gcb)
ae365cb688 Use method fetch_current_thread_functor from oslo.utils
oslo.utils provides this method, just use it and don't
keep the version of oslo.messaging.

Change-Id: If71dde829382a46bb95897cf89377428097b18dd
2016-09-24 15:22:44 +08:00
Jenkins
f468fcd755 Merge "modify the home-page info with the developer documentation" 2016-09-23 15:16:27 +00:00
Gevorg Davoian
fc093c3c8a [zmq] Fix ZmqSocket.send_string
Change-Id: I65fc7462e5cb775ecce5fdf1596fcc5ce3cf61a7
Closes-Bug: #1626985
2016-09-23 15:14:39 +03:00
Gevorg Davoian
f3ea04c568 [zmq] Remove unused methods from executors
Change-Id: I2aa5f9a2ce51f3f0c5422d94eb28d2f37e3af458
2016-09-22 20:11:00 +03:00
Hiroyasu.OHYAMA
64c5e50bc7 [zmq] Added a processing to handle ImportError in Redis plugin of Matchmaker
The MatchmakerRedis depends on 'redis' package, but there is no error
handler in it.
This patch adds processing to raise an exception when 'redis' package
doesn't exist.

Change-Id: Ib611543c76336ed1d4a204cd9b3c97cf468ad833
Closes-Bug: #1624256
2016-09-22 20:40:51 +09:00
Jenkins
885904e9ae Merge "[zmq] Unify delimeters" 2016-09-21 14:53:15 +00:00
Jenkins
b1529e8236 Merge "[zmq] Fix fanout without PUB/SUB" 2016-09-21 14:51:48 +00:00
Jenkins
8c9e451b5c Merge "[zmq] Remove unnecessary subscriptions from SubConsumer" 2016-09-21 14:47:46 +00:00
avnish
4e38293972 modify the home-page info with the developer documentation
Change-Id: I9b049fe3e0dc68302d0f50cf9c4098a2cfccdac6
2016-09-20 16:31:07 +05:30
Eric Brown
e9e16450f9 Set the valid choices for the rabbit login methods
According to the RabbitMQ client docs [1], the only valid login
methods are: PLAIN, AMQPLAIN, or RABBIT-CR-DEMO. This patch restricts
the rabbit driver to only those options.

[1] https://www.rabbitmq.com/authentication.html

Change-Id: I193f33adf4ecc1c0fd29ddc08b35533f24f1c967
2016-09-19 16:52:26 -07:00
Gevorg Davoian
b3cb65a02c [zmq] Unify delimeters
This patch simply replaces all delimeters used for generating
internal identifiers like redis keys or socket identities
with slashes (since they are visually better for debugging than
dots, hyphens or underscores, which may also occur inside
topic or server names).

Change-Id: I8e8e80f467404a87a2526c80c8fae6cba5880c6d
2016-09-16 15:16:24 +03:00
Gevorg Davoian
c3df59e1ab [zmq] Fix fanout without PUB/SUB
This patch fix incorrect fanout behavior when use_pub_sub=False.
In addition it also makes dummy matchmaker behave similar to (already
fixed here) redis one in order to make future testing more realistic
(relevant tests were also fixed and refactored).

Change-Id: Ie131de189972250ea2d9b99fe65b5908b7144569
Closes-Bug: #1622968
2016-09-16 15:14:00 +03:00
Gevorg Davoian
a9814d4cb2 [zmq] Send immediate ack after message receiving
During rally tests it was discovered that the latency between
receiving message and dispatching it can reach up to 10 minutes.
This behaviour breaks the mechanism of acks and retries in zmq driver,
which causes test failures. This patch tries to fix these problems
by moving ack sending from rpc server's thread to zmq dealer
consumer's thread (immediately after message receiving).

Change-Id: If33d14006ffa947baf5c34c8b1f61f336432374f
2016-09-16 14:50:27 +03:00
Ayoub BOUSSELMI
afaa4d935d Corrects documentation typo
In oslo_messaging/_drivers/impl_rabbit.py, the documentation of
the Consumer class is the following: """Init the Publisher class
with the exchange_name, routing_key, type, durable auto_delete""".
This should be corrected by putting Consumer instead of Publisher.

Closes-Bug: 1623550

Change-Id: I77d09aeb1268ed79590a8b02ab5bf370f3b72caf
2016-09-14 18:22:00 +02:00
Gevorg Davoian
eaf433bf49 [zmq] Remove unnecessary subscriptions from SubConsumer
Change-Id: I86c0e3408382ee85b44f440e72fab7e468f7f7e1
2016-09-14 10:59:07 +03:00
Jenkins
09fa044777 Merge "Fixups to the inline documentation" 2016-09-12 18:48:01 +00:00
Jenkins
5bf96fe761 Merge "Fix consuming from unbound reply queue" 2016-09-12 17:01:34 +00:00
Kenneth Giusti
9bc9c0dc6a Fixups to the inline documentation
Rework the inline documentation for executors, RPC servers and
clients, notifiers and notification listeners for clarity and flow.

Change-Id: If4f1db853a7fc85340177fd2c9c43a479d72459d
2016-09-12 09:49:00 -04:00
kbespalov
3f4ce9470b Fix consuming from unbound reply queue
Consumer declaration consist of the next steps:
  1) declare an exchange
  2) declare a queue
  3) bind the queue to the exchange

Due to reply exchanges are auto-delete, at the
step 3 the exchange can be removed and consumer.declare()
will raise `queue.bind 404 Exchange not found`.

So, in this case the queue is exist and AMQPListener
just call consumer.consume() on the queue and go to
drain_events() despite on the fact that the queue is
unbound.

This change tries to redeclare queue/exchange proactively
each times channel change and just before consuming messages.

Co-Authored-By: Mehdi Abaakouk <sileht@redhat.com>
Closes-Bug: #1609766
Change-Id: Id8b48df3d26675d72955d417ce7622b1e8aa6195
2016-09-12 13:25:37 +03:00
Jenkins
995bea4e62 Merge "Add configurable serialization to pika" 2016-09-11 07:39:05 +00:00
Gevorg Davoian
9bd4bbeb2d Add configurable serialization to pika
This patch makes message serialization in the pika driver
configurable.

Change-Id: Ib86cb91110aa89663a54afdd9932d60f6f45f585
Depends-On: Idb12666255a990dfc8f8ff6b43e941b3481b9c1c
2016-09-10 12:28:25 +00:00