Bases: cinder.scheduler.filters.BaseHostFilter
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).
-
host_passes(host_state, filter_properties)