Table Of Contents

Previous topic

API Endpoint

Next topic

Fake Drivers

This Page

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

Scheduler

The cinder.scheduler.manager Module

Scheduler Service

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

Bases: cinder.manager.Manager

Chooses a host to create volumes

SchedulerManager.get_host_list(context)

Get a list of hosts from the HostManager.

SchedulerManager.get_service_capabilities(context)

Get the normalized set of capabilities for this zone.

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

Process a capability update from a service node.

The cinder.scheduler.driver Module

Scheduler base class that all Schedulers should inherit from

class Scheduler

Bases: object

The base class that all Scheduler classes should inherit from.

Scheduler.get_host_list()

Get a list of hosts from the HostManager.

Scheduler.get_service_capabilities()

Get the normalized set of capabilities for the services.

Scheduler.hosts_up(context, topic)

Return the list of hosts that have a running service for topic.

Scheduler.schedule(context, topic, method, *_args, **_kwargs)

Must override schedule method for scheduler to work.

Scheduler.update_service_capabilities(service_name, host, capabilities)

Process a capability update from a service node.

cast_to_host(context, topic, host, method, update_db=True, **kwargs)

Generic cast to host

cast_to_volume_host(context, host, method, update_db=True, **kwargs)

Cast request to a volume host queue

The cinder.scheduler.simple Driver

Simple Scheduler

class SimpleScheduler

Bases: cinder.scheduler.chance.ChanceScheduler

Implements Naive Scheduler that tries to find least loaded host.

SimpleScheduler.schedule_create_volume(context, volume_id, **_kwargs)

Picks a host that is up and has the fewest volumes.

Tests

The scheduler_unittest Module