Cell messaging module.
This module defines the different message types that are passed between cells and the methods that they can call when the target cell has been reached.
The interface into this module is the MessageRunner class.
Bases: object
This class is the main interface into creating messages and processing them.
Public methods in this class are typically called by the CellsManager to create a new message and process it with the exception of ‘message_from_json’ which should be used by CellsDrivers to convert a JSONified message it has received back into the appropriate Message class.
Private methods are used internally when we need to keep some ‘global’ state. For instance, eventlet queues used for responses are held in this class. Also, when a Message is process()ed above and it’s determined we should take action locally, _process_message_locally() will be called.
When needing to add a new method to call in a Cell2Cell message, define the new method below and also add it to the appropriate MessageMethods class where the real work will be done.
Tell child cells to send us capabilities. This is typically called on startup of the nova-cells service.
Tell child cells to send us capacities. This is typically called on startup of the nova-cells service.
Backup an instance in its cell.
Destroy a BDM at top level cell.
Update/Create a BDM at top level cell.
Called by the cell scheduler to tell a child cell to build instance(s).
Update bandwidth usage at top level cell.
Return compute node entry from a specific cell by ID.
Return list of compute nodes in all child cells.
Return compute node stats from all child cells.
Confirm a resize for an instance in its cell.
Delete consoleauth tokens for an instance in API cells.
Get Key Pair by name at top level cell.
Fetch all migrations applying the filters for a given cell or all cells.
Inject networking for an instance in its cell.
This is used by API cell when it didn’t know what cell an instance was in, but the instance was requested to be deleted or soft_deleted. So, we’ll broadcast this everywhere.
Destroy an instance at the top level cell.
Create an instance fault at the top level cell.
Update an instance at the top level cell.
Update an instance object in its cell.
Live migrate an instance in its cell.
Turns a message in JSON format into an appropriate Message instance. This is called when cells receive a message from another cell.
Pause an instance in its cell.
Reboot an instance in its cell.
Reset networking for an instance in its cell.
Resize an instance in its cell.
Resume an instance in its cell.
Revert a resize for an instance in its cell.
Call a compute API method in a specific cell.
Deletes the specified service.
Used to enable/disable a service. For compute services, setting to disabled stops new builds arriving on that host.
Parameters: |
|
---|---|
Returns: | the update service object |
Snapshot an instance in its cell.
Start an instance in its cell.
Stop an instance in its cell.
Suspend an instance in its cell.
Force a sync of all instances, potentially by project_id, and potentially since a certain date/time.
Get task logs from the DB from all cells or a particular cell.
If ‘cell_name’ is None or ‘’, get responses from all cells. If ‘host’ is not None, filter by host. If ‘state’ is not None, filter by state.
Return a list of Response objects.
Send our capabilities to parent cells.
Send our capacities to parent cells.
Unpause an instance in its cell.
Validate console port with child cell compute node.
Bases: object
Holds a response from a cell. If there was a failure, ‘failure’ will be True and ‘response’ will contain an encoded Exception.
Prepares exception data to be sent over rpc.
Failure_info should be a sys.exc_info() tuple.