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
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
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
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
Currently we get a property from zmq reply/envelope through a dict
operating, for more easily accessing its properties, let's add
Response and Envelope classes and reduce dicts in our messages.
This patch will make the code more concise such as:
reply[zmq_names.FIELD_FAILURE] => reply.failure
Change-Id: I9ca7e4bee404ca8e658163827d958b69b05a16ae
Notification priority actually points to an endpoint method
to be called and couldn't be ignored by the driver.
Also reduced exchange because it shouldn't take part in
final topic resolution.
Closes-Bug #1546081
Change-Id: I4a7c367d91c2fefc6830f0ab3cdcbc0b605127b0
We need to use eventlet.sleep() in green thread loops
in order to have more chances to switch between them.
Change-Id: I7c08e82182b68b95c36265d58df0644c5ce2c171
When you send message to exchange which is not exist current
channel is closed and you need to reconnect. This is undesired.
Also this patch separate sending fanout message and call/cast
messages and don't raise exception if exchange doesn't exist
for fanout messages.
Change-Id: Ia556d0c1b219387892007925bb437664aaaccb69
Looks like there is a disconnect between the __init__
parameter 'topic' in Notifier and what we need when
we look up a driver. We should allow multiple topics
to be specified as a new topics parameter and pass
that along directly.
Change-Id: Id89957411aa219cff92fafec2f448c81cb57b3ca
The oslo.config lib includes a PortOpt to simply restrict the
range of integers available for a port type option. This patch
makes use of that.
Change-Id: I8cda92d6c7555b6cb788627d072174ad608fb6de
This patch change log string formatting approach,
moves it inside logging method to avoid formatting if
it is not needed for given log level
Change-Id: Ice73f2fc893701544cadc75bafd6833de0ae5d51
The mask_dict_password method is added from oslo_utils 3.4.0, and it's
about five times faster than the mask_password method, so it's better
to use mask_dict_password instead of mask_password.
Change-Id: I6629ed1232f2e6f1c72b9f13b361e2f9e14b50a4
This patch add sending cancel request to RabbitMQ
and inform it to stop message sending to the poller.
It makes listener stop/wait procedure more graceful
Change-Id: Ibadb5f705f6ea4ef32969a69d1db68ada1f491e4
Opposite to central-broker transport in zmq we
don't have such, but we can use transport URL
to pass credentials to redis (or other registry) for example.
Closes-Bug #1538095
Change-Id: I58069a20c129bab4a25fd17add9eb9c428fe3ff3
* poll() now returns empty list instead of None
* metadata_broker_list has been dropped, there's a new
bootstrap_servers
* Add a LOG.debug() for the actual message
python simulator.py -d DEBUG --topic notifications.info --url kafka://localhost:9092 notify-server
python simulator.py -d DEBUG --topic notifications --url kafka://localhost:9092 notify-client -m 1000 -w 1
More tips:
http://kafka.apache.org/documentation.html#quickstarthttps://www.digitalocean.com/community/tutorials/how-to-install-apache-kafka-on-ubuntu-14-04
Depends-On: Ia324b4c89b05c536708baf7950857cd159578cec
Change-Id: I80911d2678ea5e8d0cd6b146a1e29a58858e3144
Now we have situation when openstack projects like Mistral needs
extra oslo.messaging functionality.
But it is too complicated now to to implement something new and
integrate it with current code because there is a little bit mess.
1) Executor should be responsible for how to run jobs
(but now also has code with server logic)
2) Dispatcher should be responsible for routing message to the
target endpoint for processing (but it also has serialisation, sending replies,
executing some executor's callbacks etc)
3) Server should do all server specific logic, we need to have different
implementation of servers for RPC and notification, not different implementations
of dispatchers
This patch fixes 1-st point
Change-Id: Ib6408f408889bb7b7056722be636a5547b1a780d
"n-t1" as notification topic not really useful. Let's allow
it to be specified from the command line. Also make sure
we set the notification driver as "messaging" by default
Change-Id: I5daf09b9a01e4d642b0f53d7634d5b305d5a82cb
Cinder create volume hangs in default deployment devstack+zmq.
* Fix general topic resolution in matchmaker
* Fix matchmaker redis to use set instead of list
Change-Id: I25d623eb4bb0a827daa8a316a0ddcb4a473f8694
Closes-Bug: #1546106
-- "cls.scenarios = filter(f, cls.scenarios)"
It's better to set a list to cls.scenarios but filter()/map() returns
an iterator on Python 3. This patch we replaced the filter()/map() with
a list comprehension in test_server.py.
Change-Id: I16640e564d41c6a1c29e229049467ae788bb1437