Scheduler

The cinder.scheduler.manager Module

Scheduler Service

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

Bases: cinder.manager.Manager

Chooses a host to create volumes.

SchedulerManager.RPC_API_VERSION = '1.3'
SchedulerManager.create_volume(context, topic, volume_id, snapshot_id=None, image_id=None, request_spec=None, filter_properties=None)
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.init_host()
SchedulerManager.migrate_volume_to_host(context, topic, volume_id, host, force_host_copy, request_spec, filter_properties=None)

Ensure that the host exists and can accept the volume.

SchedulerManager.request_service_capabilities(context)
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.host_passes_filters(context, volume_id, host, filter_properties)

Check if the specified host passes the filters.

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.schedule_create_volume(context, request_spec, filter_properties)

Must override schedule method for scheduler to work.

Scheduler.update_service_capabilities(service_name, host, capabilities)

Process a capability update from a service node.

volume_update_db(context, volume_id, host)

Set the host and set the scheduled_at field of a volume.

Returns:A Volume with the updated fields set properly.

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, request_spec, filter_properties)

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

Tests

The scheduler_unittest Module

Table Of Contents

Previous topic

API Endpoint

Next topic

Fake Drivers

This Page