The nova.scheduler.host_manager Module

Manage hosts in the current zone.

class HostManager

Bases: object

Base HostManager class.

delete_aggregate(aggregate)

Deletes internal HostManager information about a specific aggregate.

delete_instance_info(*args, **kwargs)

Receives the UUID from a compute node when one of its instances is terminated.

The instance in the local view of the host’s instances is removed.

get_all_host_states(context)

Returns a list of HostStates that represents all the hosts the HostManager knows about. Also, each of the consumable resources in HostState are pre-populated and adjusted based on data in the db.

get_filtered_hosts(hosts, filter_properties, filter_class_names=None, index=0)

Filter hosts and return only ones passing all filters.

get_weighed_hosts(hosts, weight_properties)

Weigh the hosts.

host_state_cls(host, node, **kwargs)
sync_instance_info(*args, **kwargs)

Receives the uuids of the instances on a host.

This method is periodically called by the compute nodes, which send a list of all the UUID values for the instances on that node. This is used by the scheduler’s HostManager to detect when its view of the compute node’s instances is out of sync.

update_aggregates(aggregates)

Updates internal HostManager information about aggregates.

update_instance_info(*args, **kwargs)

Receives an InstanceList object from a compute node.

This method receives information from a compute node when it starts up, or when its instances have changed, and updates its view of hosts and instances with it.

class HostState(host, node, compute=None)

Bases: object

Mutable and immutable information tracked for a host. This is an attempt to remove the ad-hoc data structures previously used and lock down access.

consume_from_instance(instance)

Incrementally update host state from an instance.

update_from_compute_node(compute)

Update information about a host from a ComputeNode object.

update_service(service)
class ReadOnlyDict(source=None)

Bases: UserDict.IterableUserDict

A read-only dict.

clear()
pop(key, *args)
popitem()
update()
set_update_time_on_success(f)

Set updated time of HostState when consuming succeed.

Previous topic

The nova.scheduler.filters.utils Module

Next topic

The nova.scheduler.ironic_host_manager Module

Project Source

This Page