Cinder Scheduler Filters

AvailabilityZoneFilter

Filters Hosts by availability zone.

CapabilitiesFilter

HostFilter to work with resource (instance & volume) type records.

CapacityFilter

CapacityFilter filters based on volume host’s capacity utilization.

DifferentBackendFilter

Schedule volume on a different back-end from a set of volumes.

DriverFilter

DriverFilter filters hosts based on a ‘filter function’ and metrics.

DriverFilter filters based on volume host’s provided ‘filter function’ and metrics.

InstanceLocalityFilter

Schedule volume on the same host as a given instance.

This filter enables selection of a storage back-end located on the host where the instance’s hypervisor is running. This provides data locality: the instance and the volume are located on the same physical machine.

In order to work: - The Extended Server Attributes extension needs to be active in Nova (this

is by default), so that the ‘OS-EXT-SRV-ATTR:host’ property is returned when requesting instance info.
  • Either an account with privileged rights for Nova must be configured in Cinder configuration (see ‘os_privileged_user_name’), or the user making the call needs to have sufficient rights (see ‘extended_server_attributes’ in Nova policy).

JsonFilter

Host Filter to allow simple JSON-based grammar for selecting hosts.

RetryFilter

Filter out previously attempted hosts

A host passes this filter if it has not already been attempted for scheduling. The scheduler needs to add previously attempted hosts to the ‘retry’ key of filter_properties in order for this to work correctly. For example:

{
 'retry': {
           'hosts': ['host1', 'host2'],
           'num_attempts': 3,
          }
}

SameBackendFilter

Schedule volume on the same back-end as another volume.