Expose enable_isolated_aggregate_filtering parameter

Add support for configuring scheduler parameter option
`enable_isolated_aggregate_filtering` which allows the
scheduler to restrict hosts in aggregates based on matching
required traits in the aggregate metadata and the instance
flavor/image.

Change-Id: Iefb7e8a4d867b8721cdb5b00c2f71b2dd3a492c0
This commit is contained in:
Rajesh Tailor 2020-04-08 11:57:18 +05:30
parent 57d6e98b53
commit 4b13841995
3 changed files with 24 additions and 0 deletions

View File

@ -55,6 +55,12 @@
# from the placement service during a scheduling operation. # from the placement service during a scheduling operation.
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*enable_isolated_aggregate_filtering*]
# (Optional) This setting allows the scheduler to restrict hosts in aggregates
# based on matching required traits in the aggregate metadata and the instance
# flavor/image.
# Defaults to $::os_service_default
#
class nova::scheduler( class nova::scheduler(
$enabled = true, $enabled = true,
$manage_service = true, $manage_service = true,
@ -66,6 +72,7 @@ class nova::scheduler(
$limit_tenants_to_placement_aggregate = $::os_service_default, $limit_tenants_to_placement_aggregate = $::os_service_default,
$placement_aggregate_required_for_tenants = $::os_service_default, $placement_aggregate_required_for_tenants = $::os_service_default,
$max_placement_results = $::os_service_default, $max_placement_results = $::os_service_default,
$enable_isolated_aggregate_filtering = $::os_service_default,
) { ) {
include nova::deps include nova::deps
@ -89,5 +96,6 @@ class nova::scheduler(
'scheduler/limit_tenants_to_placement_aggregate': value => $limit_tenants_to_placement_aggregate; 'scheduler/limit_tenants_to_placement_aggregate': value => $limit_tenants_to_placement_aggregate;
'scheduler/placement_aggregate_required_for_tenants': value => $placement_aggregate_required_for_tenants; 'scheduler/placement_aggregate_required_for_tenants': value => $placement_aggregate_required_for_tenants;
'scheduler/max_placement_results': value => $max_placement_results; 'scheduler/max_placement_results': value => $max_placement_results;
'scheduler/enable_isolated_aggregate_filtering': value => $enable_isolated_aggregate_filtering;
} }
} }

View File

@ -0,0 +1,7 @@
---
features:
- |
Add parameter `enable_isolated_aggregate_filtering` which allows the
scheduler to restrict hosts in aggregates based on matching required
traits in the aggregate metadata and the instance flavor/image.
Default value for this parameter is False.

View File

@ -24,6 +24,7 @@ describe 'nova::scheduler' do
it { is_expected.to contain_nova_config('scheduler/limit_tenants_to_placement_aggregate').with_value('<SERVICE DEFAULT>') } it { is_expected.to contain_nova_config('scheduler/limit_tenants_to_placement_aggregate').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('scheduler/placement_aggregate_required_for_tenants').with_value('<SERVICE DEFAULT>') } it { is_expected.to contain_nova_config('scheduler/placement_aggregate_required_for_tenants').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('scheduler/max_placement_results').with_value('<SERVICE DEFAULT>') } it { is_expected.to contain_nova_config('scheduler/max_placement_results').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('scheduler/enable_isolated_aggregate_filtering').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_class('nova::availability_zone') } it { is_expected.to contain_class('nova::availability_zone') }
@ -102,6 +103,14 @@ describe 'nova::scheduler' do
it { is_expected.to contain_nova_config('scheduler/max_placement_results').with_value(10) } it { is_expected.to contain_nova_config('scheduler/max_placement_results').with_value(10) }
end end
context 'with enable_isolated_aggregate_filtering' do
let :params do
{ :enable_isolated_aggregate_filtering => true }
end
it { is_expected.to contain_nova_config('scheduler/enable_isolated_aggregate_filtering').with_value(true) }
end
context 'with default database parameters' do context 'with default database parameters' do
let :pre_condition do let :pre_condition do
"include nova" "include nova"