Scheduler¶
The manila.scheduler.manager
Module¶
Scheduler Service
-
class
SchedulerManager
(scheduler_driver=None, service_name=None, *args, **kwargs) Bases:
manila.manager.Manager
Chooses a host to create shares.
-
RPC_API_VERSION
= '1.4'
-
create_consistency_group
(context, cg_id, request_spec=None, filter_properties=None)
-
create_share_instance
(context, request_spec=None, filter_properties=None)
-
get_host_list
(context) Get a list of hosts from the HostManager.
-
get_pools
(context, filters=None) Get active pools from the scheduler’s cache.
-
get_service_capabilities
(context) Get the normalized set of capabilities for this zone.
-
init_host
()
-
migrate_share_to_host
(context, share_id, host, force_host_copy, request_spec, filter_properties=None) Ensure that the host exists and can accept the share.
-
request_service_capabilities
(context)
-
update_service_capabilities
(context, service_name=None, host=None, capabilities=None, **kwargs) Process a capability update from a service node.
-
The manila.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.
-
get_host_list
() Get a list of hosts from the HostManager.
-
get_pools
(context, filters) Must override schedule method for scheduler to work.
-
get_service_capabilities
() Get the normalized set of capabilities for the services.
-
host_passes_filters
(context, host, request_spec, filter_properties) Must override schedule method for migration to work.
-
hosts_up
(context, topic) Return the list of hosts that have a running service for topic.
-
schedule
(context, topic, method, *_args, **_kwargs) Must override schedule method for scheduler to work.
-
schedule_create_consistency_group
(context, group_id, request_spec, filter_properties) Must override schedule method for scheduler to work.
-
schedule_create_share
(context, request_spec, filter_properties) Must override schedule method for scheduler to work.
-
update_service_capabilities
(service_name, host, capabilities) Process a capability update from a service node.
-
-
cg_update_db
(context, cg_id, host) Set the host and set the updated_at field of a consistency group.
Returns: A CG with the updated fields set properly.
-
share_update_db
(context, share_id, host) Set the host and set the scheduled_at field of a share.
Returns: A Share with the updated fields set properly.
The manila.scheduler.simple
Driver¶
Simple Scheduler
-
class
SimpleScheduler
Bases:
manila.scheduler.chance.ChanceScheduler
Implements Naive Scheduler that tries to find least loaded host.
-
schedule_create_share
(context, request_spec, filter_properties) Picks a host that is up and has the fewest shares.
-