The nova.cells.messaging Module

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.

class MessageRunner(state_manager)

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.

action_events_get(ctxt, cell_name, action_id)
action_get_by_request_id(ctxt, cell_name, instance_uuid, request_id)
actions_get(ctxt, cell_name, instance_uuid)
ask_children_for_capabilities(ctxt)

Tell child cells to send us capabilities. This is typically called on startup of the nova-cells service.

ask_children_for_capacities(ctxt)

Tell child cells to send us capacities. This is typically called on startup of the nova-cells service.

bw_usage_update_at_top(ctxt, bw_update_info)

Update bandwidth usage at top level cell.

compute_node_get(ctxt, cell_name, compute_id)

Return compute node entry from a specific cell by ID.

compute_node_get_all(ctxt, hypervisor_match=None)

Return list of compute nodes in all child cells.

compute_node_stats(ctxt)

Return compute node stats from all child cells.

consoleauth_delete_tokens(ctxt, instance_uuid)

Delete consoleauth tokens for an instance in API cells.

static get_message_types()
instance_delete_everywhere(ctxt, instance, delete_type)

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.

instance_destroy_at_top(ctxt, instance)

Destroy an instance at the top level cell.

instance_fault_create_at_top(ctxt, instance_fault)

Create an instance fault at the top level cell.

instance_update_at_top(ctxt, instance)

Update an instance at the top level cell.

message_from_json(json_message)

Turns a message in JSON format into an appropriate Message instance. This is called when cells receive a message from another cell.

proxy_rpc_to_manager(ctxt, cell_name, host_name, topic, rpc_message, call, timeout)
run_compute_api_method(ctxt, cell_name, method_info, call)

Call a compute API method in a specific cell.

schedule_run_instance(ctxt, target_cell, host_sched_kwargs)

Called by the scheduler to tell a child cell to schedule a new instance for build.

service_get_all(ctxt, filters=None)
service_get_by_compute_host(ctxt, cell_name, host_name)
sync_instances(ctxt, project_id, updated_since, deleted)

Force a sync of all instances, potentially by project_id, and potentially since a certain date/time.

task_log_get_all(ctxt, cell_name, task_name, period_beginning, period_ending, host=None, state=None)

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.

tell_parents_our_capabilities(ctxt)

Send our capabilities to parent cells.

tell_parents_our_capacities(ctxt)

Send our capacities to parent cells.

validate_console_port(ctxt, cell_name, instance_uuid, console_port, console_type)

Validate console port with child cell compute node.

class Response(cell_name, value, failure)

Bases: object

Holds a response from a cell. If there was a failure, ‘failure’ will be True and ‘response’ will contain an encoded Exception.

classmethod from_json(json_message)
to_json()
value_or_raise()

Previous topic

The nova.cells.manager Module

Next topic

The nova.cells.opts Module

This Page