diff --git a/releasenotes/notes/configurable-scheduler-filters-17ea2ed9d4aa0708.yaml b/releasenotes/notes/configurable-scheduler-filters-17ea2ed9d4aa0708.yaml new file mode 100644 index 00000000..e69700a0 --- /dev/null +++ b/releasenotes/notes/configurable-scheduler-filters-17ea2ed9d4aa0708.yaml @@ -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 \ No newline at end of file diff --git a/templates/cinder.conf.j2 b/templates/cinder.conf.j2 index 910d168d..7feba717 100644 --- a/templates/cinder.conf.j2 +++ b/templates/cinder.conf.j2 @@ -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 }}