Scheduler Service
Bases: nova.manager.Manager
Chooses a host to run instances on.
Get a list of hosts from the HostManager.
Get the normalized set of capabilities for this zone.
Tries to call schedule_prep_resize on the driver. Sets instance vm_state to ACTIVE on NoHostFound Sets vm_state to ERROR on other exceptions
Tries to call schedule_run_instance on the driver. Sets instance vm_state to ERROR on exceptions
Shows the physical/usage resource given by hosts.
Parameters: |
|
---|---|
Returns: | example format is below: {'resource':D, 'usage':{proj_id1:D, proj_id2:D}}
D: {'vcpus': 3, 'memory_mb': 2048, 'local_gb': 2048,
'vcpus_used': 12, 'memory_mb_used': 10240,
'local_gb_used': 64}
|
Process a capability update from a service node.
Scheduler base class that all Schedulers should inherit from
Bases: object
The base class that all Scheduler classes should inherit from.
Checks if destination host has enough disk for block migration.
Parameters: |
|
---|
Checks if destination host has enough memory for live migration.
Parameters: |
|
---|
Checks if destination host has enough resource for live migration.
Parameters: |
|
---|
Create instance DB entry based on request_spec
Get a list of hosts from the HostManager.
Get the normalized set of capabilities for the services.
Return the list of hosts that have a running service for topic.
Check if the src and dest host mount same shared storage.
At first, dest host creates temp file, and src host can see it if they mounts same shared storage. Then src host erase it.
Parameters: |
|
---|
Must override schedule method for scheduler to work.
Live migration scheduling method.
Parameters: |
|
---|---|
Returns: | The host where instance is running currently. Then scheduler send request that host. |
Must override schedule_prep_resize method for scheduler to work.
Must override schedule_run_instance method for scheduler to work.
Process a capability update from a service node.
Cast request to a compute host queue
Generic cast to host
Cast request to a network host queue
Cast request to a volume host queue
Encode locally created instance for return via RPC
Chance (Random) Scheduler implementation
Bases: nova.scheduler.driver.Scheduler
Implements Scheduler as a random node selector.
Picks a host that is up at random.
Select a target for resize.
Create and run an instance or instances
Simple Scheduler
Bases: nova.scheduler.chance.ChanceScheduler
Implements Naive Scheduler that tries to find least loaded host.
Picks a host that is up and has the fewest volumes.