Merge "Simplify scheduler filter additions"

This commit is contained in:
Zuul 2020-10-13 09:35:35 +00:00 committed by Gerrit Code Review
commit 5961ab812c
4 changed files with 33 additions and 11 deletions

View File

@ -312,16 +312,18 @@ nova_reserved_host_disk_mb: 2048
nova_scheduler_host_subset_size: 10
nova_scheduler_max_attempts: 5
nova_scheduler_default_filters: >-
AvailabilityZoneFilter,
ComputeFilter,
AggregateNumInstancesFilter,
AggregateIoOpsFilter,
ComputeCapabilitiesFilter,
ImagePropertiesFilter,
ServerGroupAntiAffinityFilter,
ServerGroupAffinityFilter,
NUMATopologyFilter
nova_scheduler_default_filters:
- AvailabilityZoneFilter
- ComputeFilter
- AggregateNumInstancesFilter
- AggregateIoOpsFilter
- ComputeCapabilitiesFilter
- ImagePropertiesFilter
- ServerGroupAntiAffinityFilter
- ServerGroupAffinityFilter
- NUMATopologyFilter
nova_scheduler_extra_filters: []
# This should be tuned depending on the number of compute hosts present in the
# deployment. Large clouds may wish to disable automatic discovery by setting

View File

@ -0,0 +1,11 @@
---
features:
- |
Added variable `nova_scheduler_extra_filters` which allows to extend
list of defaulted `nova_scheduler_default_filters`
upgrade:
- |
String value of `nova_scheduler_default_filters` is converted to the list
At the moment there is compatability for overriden values, that are string,
but this support will be removed in the future releases. So deployers are
recommended to replace their string overrides with list ones.

View File

@ -276,7 +276,7 @@ discover_hosts_in_cells_interval = {{ nova_discover_hosts_in_cells_interval }}
[filter_scheduler]
max_io_ops_per_host = {{ nova_max_io_ops_per_host }}
ram_weight_multiplier = {{ nova_ram_weight_multiplier }}
enabled_filters = {{ nova_scheduler_default_filters }}
enabled_filters = {{ _nova_scheduler_filters | join(',') }}
host_subset_size = {{ nova_scheduler_host_subset_size }}
tracks_instance_changes = {{ nova_scheduler_tracks_instance_changes }}

View File

@ -93,3 +93,12 @@ nova_core_files:
owner: "root"
group: "{{ nova_system_group_name }}"
mode: "0640"
_nova_scheduler_filters: |-
{% set default_filters = nova_scheduler_default_filters %}
{% if default_filters is not iterable and default_filters is string %}
{% set filters = default_filters.split(',') %}
{% else %}
{% set filters = default_filters %}
{% endif %}
{{ default_filters + nova_scheduler_extra_filters }}