cinder.scheduler.manager module

cinder.scheduler.manager module

Scheduler Service

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

Bases: CleanableManager, Manager

Chooses a host to create volumes.

RPC_API_VERSION = '3.12'
create_backup(context, backup)
create_group(context, group, group_spec=None, group_filter_properties=None, request_spec_list=None, filter_properties_list=None)
create_snapshot(ctxt, volume, snapshot, backend, request_spec=None, filter_properties=None)

Create snapshot for a volume.

The main purpose of this method is to check if target backend (of volume and snapshot) has sufficient capacity to host to-be-created snapshot.

create_volume(context, volume, snapshot_id=None, image_id=None, request_spec=None, filter_properties=None, backup_id=None)
extend_volume(context, volume, new_size, reservations, request_spec=None, filter_properties=None)
get_pools(context, filters=None)

Get active pools from scheduler’s cache.

NOTE(dulek): There’s no self._wait_for_scheduler() because get_pools is an RPC call (is blocking for the c-api). Also this is admin-only API extension so it won’t hurt the user much to retry the request manually.

init_host_with_rpc()

A hook for service to do jobs after RPC is ready.

Like init_host(), this method is a hook where services get a chance to execute tasks that need RPC. Child classes should override this method.

manage_existing(context, volume, request_spec, filter_properties=None)

Ensure that the host exists and can accept the volume.

manage_existing_snapshot(context, volume, snapshot, ref, request_spec, filter_properties=None)

Ensure that the host exists and can accept the snapshot.

migrate_volume(context: RequestContext, volume: Volume, backend: str, force_copy: bool, request_spec, filter_properties) None

Ensure that the backend exists and can accept the volume.

migrate_volume_to_host(context, volume, host, force_host_copy, request_spec, filter_properties=None)
notify_service_capabilities(context, service_name, capabilities, host=None, backend=None, timestamp=None)

Process a capability update from a service node.

request_service_capabilities(context: RequestContext) None
reset()

Method executed when SIGHUP is caught by the process.

We’re utilizing it to reset RPC API version pins to avoid restart of the service when rolling upgrade is completed.

retype(context, volume, request_spec, filter_properties=None)

Schedule the modification of a volume’s type.

Parameters:
  • context – the request context

  • volume – the volume object to retype

  • request_spec – parameters for this retype request

  • filter_properties – parameters to filter by

target = <Target version=3.12>
update_service_capabilities(context, service_name=None, host=None, capabilities=None, cluster_name=None, timestamp=None, **kwargs)

Process a capability update from a service node.

property upgrading_cloud
validate_host_capacity(context, backend, request_spec, filter_properties)
work_cleanup(context, cleanup_request)

Process request from API to do cleanup on services.

Here we retrieve from the DB which services we want to clean up based on the request from the user.

Then send individual cleanup requests to each of the services that are up, and we finally return a tuple with services that we have sent a cleanup request and those that were not up and we couldn’t send it.

append_operation_type(name=None)
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.