Previous topic

The nova.scheduler.least_cost Module

Next topic

The nova.scheduler.multi Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.scheduler.manager Module

Scheduler Service

class SchedulerManager(scheduler_driver=None, *args, **kwargs)

Bases: nova.manager.Manager

Chooses a host to run instances on.

get_host_list(context)

Get a list of hosts from the HostManager.

get_service_capabilities(context)

Get the normalized set of capabilities for this zone.

prep_resize(context, topic, *args, **kwargs)

Tries to call schedule_prep_resize on the driver. Sets instance vm_state to ACTIVE on NoHostFound Sets vm_state to ERROR on other exceptions

run_instance(context, topic, *args, **kwargs)

Tries to call schedule_run_instance on the driver. Sets instance vm_state to ERROR on exceptions

show_host_resources(context, host)

Shows the physical/usage resource given by hosts.

Parameters:
  • context – security context
  • host – hostname
Returns:

example format is below:

{'resource':D, 'usage':{proj_id1:D, proj_id2:D}}
D: {'vcpus': 3, 'memory_mb': 2048, 'local_gb': 2048,
    'vcpus_used': 12, 'memory_mb_used': 10240,
    'local_gb_used': 64}

update_service_capabilities(context, service_name=None, host=None, capabilities=None, **kwargs)

Process a capability update from a service node.