oslo.messaging deprecated transport aliases since 5.2.0+
that is the minimal version supported for stable/newton.
This commit deprecates aliases kwargs of TransportURL() and
get_transport(), then we can remove the parameter aliases
in the future version.
debtcollector's decorator updated_kwarg_default_value is used to indicate
default value will be changed in future version. We introduced parameter
access_policy and add itfor constructor method of RPCDispatcher in
d3a8f280eb. Other services usually call
get_rpc_server method instead of calling constructor method of
RPCDispatcher. get_rpc_server method constructs RPCDispatcher instance
in , then FutureWarning will be generated even we set parameter
access_policy explicitly. Need move the decorator updated_kwarg_default_value
to method get_rec_server to avoid the case.
 f1efaf1b6e/oslo_messaging/rpc/server.py (L200).
15cd99050c added this alias
to workaround an issue with neutron using the internal
path in liberty. That was fixed in neutron in mitaka:
The alias was left for liberty, but liberty is end of life
now so we can remove this.
Generating the payload of a notificatiton might be expensive due
to database access. This expensive step is unnecessary if the
notification driver is set to noop because it means that the
generated payload will not be sent.
This patch makes it possible for the user of the notifier to check
if the notifier will emit any notification before the payload
Cinder already implemented similar behavior in
I77f655d3ef90088ce71304da5d4ea7b543991e90 and nova also plans
to do it in I3e6741d59df49e1e58409314008c2ed609fdedc1
This makes the SSL-related parameters to be similar to the ones used by
the AMQP and pika drivers. This will enable easier configuration of
these parameters if the transport URL is used. And easier migration from
one driver to the other when needed.
When driver load we allow to override option unrelated to the driver and
to set option useless for the driver.
This change validates the query string when the driver load to report as
soon as possible invalid options. And allow to override only option
of the driver option group (ie: [oslo_messaging_<driver_name>].
ConfigOptsProxy have been implemented only pika driver while
the oslo.messaging allow to pass the query string for all drivers.
This change fixes that.
Next step is to validate the query with ConfigOptsProxy, to
raise appropriate exception in case of mis-configuration.
ack/requeue messages are currently done in the
But _process_incoming() in run by a futurist Executor.
That can be a threading or an eventlet executor.
With eventlet, we don't really share the socket between threads.
But with threading executor and expecialy ssl, this can't work, if you
write data with two different threads to the socket.
This change moves back the message ack/requeue to the polling threads
that handle the connection, instead of the threads we spawn for the
Oslo Messaging now always use a connection in the same thread.
For dynamic connections it is crucial to close connection
and not to have hanging sockets either we have sent message
successfully or not.
eventlet.green.zmq by default blocks the calling thread on sending message
when connection was not established yet (which is correct DEALER
socket behavior though), but socket cannot be closed when we hang on
sending forever (if we never get the valid host to connect).
eventlet also shields EAGAIN exception in default (blocking) sending mode
so we need to use async zmq.NOBLOCK flag to receive this exception
and hanlde it in our own way to not block forever.
- kombu4 wraps recoverable errors as OperationalErrors rather than
raising amqp errors
- also, raise a recoverable error and redeclare if for some reason a
message is double acknowledged... previously, this was hidden.
- ensure socket is not none
- use connect method to ensure connection
The mock module has been added to Python 3.3 as unittest.mock.
The third party mock module doesn't seem to be maintained anymore.
This is follow up of 72c501454e and
add hacking rule to avoid regression issue.
oslotest prepares mock for six in oslotest/__init__.py as follow:
six.add_move(six.MovedModule('mock', 'mock', 'unittest.mock')) and
oslo_messaging/tests/__init__.py imports oslotest before importing
test submodules to setup six.moves for mock, then "from six.moves
import mock" works well.
Note: unittest.mock also detects wrong usage of method
We need to pass into VersionInfo what one would expect from running:
Right now we pass in say oslo_context and pbr fails if there is no .git in
the python source tree
Option use_dynamic_connections has to be counted when direct
publisher is being created along with proxy publisher (ZmqClientMixDirectPubSub).
ZeroMQ manages failover automatically when socket is
being connected to multiple hosts. Dynamic connections
mode assumes to connect once per message so we connect
only to a single host. However we cannot say for sure
if this host is still alive. For failover reasons
we can connect to a primary host and then add some
more hosts as failover and let ZeroMQ to decide where
it finally sends the message.
For zmq.DEALER socket there are two round-robin modes exist,
controlled by zmq.IMMEDIATE option. Immediate True means sending
only to running servers and False means to send to all connected
servers (may be not up and running at the moment).
If we do all messaging over DEALER socket as we do for direct
connections, immediate=True better suits for direct CALL/CAST
message types and immediate=False is better for fanout.
This patch fixes things for dynamic connections as for static
we already used the approach.
A message ack status of 'RELEASED' or 'MODIFIED' indicates that the
message was not accepted by the destination due to some temporary
issue. These status are used to indicate to the sender that the
message can be safely re-transmitted without risk of duplication
(i.e. the delivery is not 'in-doubt'). For example this may happen
during a message bus topology update if a message is sent before the
This change implements re-send for these cases.