Add parameter for `query_placement_for_availability_zone`
Add new parameter `scheduler/query_placement_for_availability_zone`
that allows the scheduler to look up a host aggregate with metadata
key of availability zone set to the value provided by incoming request,
and request result from placement be limited to that aggregate.
Change-Id: Ie02c732d9d75e1d5783f2aa841f244c9bee695ed
(cherry picked from commit 8ffc47e48e
)
This commit is contained in:
parent
fc45f6317a
commit
2ebc3195c3
|
@ -61,6 +61,13 @@
|
||||||
# flavor/image.
|
# flavor/image.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*query_placement_for_availability_zone*]
|
||||||
|
# (Optional) This setting allows the scheduler to look up a host aggregate
|
||||||
|
# with metadata key of availability zone set to the value provided by
|
||||||
|
# incoming request, and request result from placement be limited to that
|
||||||
|
# aggregate.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
class nova::scheduler(
|
class nova::scheduler(
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
|
@ -73,6 +80,7 @@ class nova::scheduler(
|
||||||
$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,
|
$enable_isolated_aggregate_filtering = $::os_service_default,
|
||||||
|
$query_placement_for_availability_zone = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
|
@ -97,5 +105,6 @@ class nova::scheduler(
|
||||||
'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;
|
'scheduler/enable_isolated_aggregate_filtering': value => $enable_isolated_aggregate_filtering;
|
||||||
|
'scheduler/query_placement_for_availability_zone': value => $query_placement_for_availability_zone;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Add parameter `query_placement_for_availability_zone` that allows the
|
||||||
|
scheduler to look up a host aggregate with metadata key of availability
|
||||||
|
zone set to the value provided by incoming request, and request result
|
||||||
|
from placement be limited to that aggregate.
|
||||||
|
Default value for this parameter is false.
|
|
@ -25,6 +25,7 @@ describe 'nova::scheduler' do
|
||||||
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_nova_config('scheduler/enable_isolated_aggregate_filtering').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_nova_config('scheduler/query_placement_for_availability_zone').with_value('<SERVICE DEFAULT>') }
|
||||||
|
|
||||||
it { is_expected.to contain_class('nova::availability_zone') }
|
it { is_expected.to contain_class('nova::availability_zone') }
|
||||||
|
|
||||||
|
@ -111,6 +112,14 @@ describe 'nova::scheduler' do
|
||||||
it { is_expected.to contain_nova_config('scheduler/enable_isolated_aggregate_filtering').with_value(true) }
|
it { is_expected.to contain_nova_config('scheduler/enable_isolated_aggregate_filtering').with_value(true) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with query_placement_for_availability_zone' do
|
||||||
|
let :params do
|
||||||
|
{ :query_placement_for_availability_zone => true }
|
||||||
|
end
|
||||||
|
|
||||||
|
it { is_expected.to contain_nova_config('scheduler/query_placement_for_availability_zone').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"
|
||||||
|
|
Loading…
Reference in New Issue