Introduce cinder_scheduler_default_filters

Operators may want to define specific default filters. Previously,
they could only do so via cinder_cinder_conf_overrides.

Make the cinder.conf template understand cinder_scheduler_default_filters,
a list variable that, if defined, is folded into a comma-separated
list for scheduler_default_filters in the [DEFAULT] section.

Change-Id: I12859167d19b9f40e3378ac08fed094a42f40bc7
This commit is contained in:
Florian Haas 2019-02-15 16:06:51 +01:00
parent ada7167002
commit ffbd0a1aaf
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,25 @@
---
features:
- |
The list of enabled filters for the Cinder scheduler,
`scheduler_default_filters` in `cinder.conf`, could previously be
defined only via an entry in ``cinder_cinder_conf_overrides``. You now
have the option to instead define a list variable,
``cinder_scheduler_default_filters``, that defines the enabled
filters. This is helpful if you either want to disable one of the
filters enabled by default (at the time of writing, these are
`AvailabilityZoneFilter`, `CapacityFilter`, and
`CapabilitiesFilter`), or if conversely you want to add a filter
that is normally not enabled, such as `DifferentBackendFilter` or
`InstanceLocalityFilter`.
For example, to enable the `InstanceLocalityFilter` in addition to
the normally enabled scheduler filters, use the following variable.
.. code-block:: yaml
cinder_scheduler_default_filters:
- AvailabilityZoneFilter
- CapacityFilter
- CapabilitiesFilter
- InstanceLocalityFilter

View File

@ -17,6 +17,12 @@ auth_strategy = {{ cinder_auth_strategy }}
## Cinder API's enabled
{% if cinder_services['cinder-volume']['group'] in group_names %}
{% if cinder_service_backup_program_enabled == true %}
## Cinder Scheduler
{% if cinder_scheduler_default_filters is defined %}
scheduler_default_filters={{ cinder_scheduler_default_filters | join(',') }}
{% endif %}
## Cinder Backup
backup_driver = {{ cinder_service_backup_driver }}
backup_metadata_version = {{ cinder_service_backup_metadata_version }}