Cinder Scheduler Filters¶
AvailabilityZoneFilter¶
Filters Backends by availability zone.
CapabilitiesFilter¶
BackendFilter to work with resource (instance & volume) type records.
CapacityFilter¶
Capacity filters based on volume backend’s capacity utilization.
DifferentBackendFilter¶
Schedule volume on a different back-end from a set of volumes.
DriverFilter¶
DriverFilter filters backend based on a ‘filter function’ and metrics.
DriverFilter filters based on volume backend’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 (configure a keystone authentication plugin in the [nova] section), or the user making the call needs to have sufficient rights (see ‘extended_server_attributes’ in Nova policy).
JsonFilter¶
Backend filter for simple JSON-based grammar for selecting backends.
If you want to choose one of your backend, make a query hint, for example:
cinder create –hint query=’[“=”, “$backend_id”, “rbd:vol@ceph#cloud”]’
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': {
'backends': ['backend1', 'backend2'],
'num_attempts': 3,
}
}
SameBackendFilter¶
Schedule volume on the same back-end as another volume.