Cells RPC Communication Driver
Bases: nova.cells.driver.BaseCellsDriver
Driver for cell<->cell communication via RPC. This is used to setup the RPC consumers as well as to send a message to another cell.
One instance of this class will be created for every neighbor cell that we find in the DB and it will be associated with the cell in its CellState.
One instance is also created by the cells manager for setting up the consumers.
Use the IntercellRPCAPI to send a message to a cell.
Start RPC consumers.
Start up 2 separate consumers for handling inter-cell communication via RPC. Both handle the same types of messages, but requests/replies are separated to solve potential deadlocks. (If we used the same queue for both, it’s possible to exhaust the RPC thread pool while we wait for replies.. such that we’d never consume a reply.)
Stop RPC consumers.
NOTE: Currently there’s no hooks when stopping services to have managers cleanup, so this is not currently called.
Bases: nova.openstack.common.rpc.proxy.RpcProxy
Client side of the Cell<->Cell RPC API.
The CellsRPCDriver uses this to make calls to another cell.
Send a message to another cell by JSON-ifying the message and making an RPC cast to ‘process_message’. If the message says to fanout, do it. The topic that is used will be ‘CONF.rpc_driver_queue_base.<message_type>’.
Bases: object
RPC Dispatcher to handle messages received from other cells.
All messages received here have come from a sibling cell. Depending on the ultimate target and type of message, we may process the message in this cell, relay the message to another sibling cell, or both. This logic is defined by the message class in the messaging module.
We received a message from another cell. Use the MessageRunner to turn this from JSON back into an instance of the correct Message class. Then process it!