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.

backend_passes_filters(context, backend, request_spec, filter_properties)

Check if the specified backend passes the filters.

find_retype_backend(context, request_spec, filter_properties=None, migration_policy='never')

Find a backend that can accept the volume with its new type.

find_retype_host(context, request_spec, filter_properties=None, migration_policy='never')

Find a backend that can accept the volume with its new type.

get_backup_host(volume, availability_zone, driver=None)

Must override schedule method for scheduler to work.

get_pools(context, filters)

Must override schedule method for scheduler to work.

host_passes_filters(context, backend, request_spec, filter_properties)

Check if the specified backend passes the filters.

is_first_receive()

Returns True if Scheduler receives the capabilities at startup.

This is to handle the problem of too long sleep time during scheduler service startup process.

is_ready()

Returns True if Scheduler is ready to accept requests.

This is to handle scheduler service startup when it has no volume hosts stats and will fail all the requests.

notify_service_capabilities(service_name, backend, capabilities, timestamp)

Notify capability update from a service node.

reset()

Reset volume RPC API object to load new version pins.

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

Must override schedule method for scheduler to work.

schedule_create_group(context, group, group_spec, request_spec_list, group_filter_properties, filter_properties_list)

Must override schedule method for scheduler to work.

schedule_create_volume(context, request_spec, filter_properties)

Must override schedule method for scheduler to work.

update_service_capabilities(service_name, host, capabilities, cluster_name, timestamp)

Process a capability update from a service node.

generic_group_update_db(context, group, host, cluster_name)

Set the host and the scheduled_at field of a group.

Returns:

A Group with the updated fields set properly.

volume_update_db(context, volume_id, host, cluster_name, availability_zone=None, volume=None)

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

Returns:

A Volume with the updated fields set properly.