RPC call/cast should end quickly if no connection

Bug #1848160 reported by Rodolfo Alonso
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
oslo.messaging
New
Undecided
Unassigned

Bug Description

In Neutron (and many other projects), "cast" is used to notify other services about some specific events (e.g.: a new port creation), by calling a RPC in this external process.

If the message queue is down, the "cast" method call chain is the following:
-> client._CaseCallContext.cast
-> transport.Transport.send
-> amqpdriver.AMQPDriver.send -> _send -> _get_connection [1]

Because RabbitMQ is down and there is no timeout/max_retries flag, the method never returns and the "cast" call does not finish.

Is it possible to, in case of no connection to the MQ, end quickly the "call"/"cast" call? Returning an exception or any other kind of error, but avoiding to be in an endless loop inside the driver.

Thank you in advance. Please, if you want to talk about this, my nickname is "ralonsoh". I'm in #openstack-neutron and #openstack-oslo, UTC time.

[1] https://opendev.org/openstack/oslo.messaging/src/branch/master/oslo_messaging/_drivers/amqpdriver.py#L608

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.