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. Conflicts: manifests/scheduler.pp spec/classes/nova_scheduler_spec.rb Resolved conflict occured due to missing change Iefb7e8a4d867b8721cdb5b00c2f71b2dd3a492c0 Change-Id: Ie02c732d9d75e1d5783f2aa841f244c9bee695ed (cherry picked from commit8ffc47e48e
) (cherry picked from commit2ebc3195c3
) (cherry picked from commit74473423a0
)
This commit is contained in:
parent
e6e747272a
commit
3b961af09c
|
@ -44,6 +44,13 @@
|
|||
# If all tenants should be confined via aggregate, then this should be True.
|
||||
# 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(
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
|
@ -53,6 +60,7 @@ class nova::scheduler(
|
|||
$discover_hosts_in_cells_interval = $::os_service_default,
|
||||
$limit_tenants_to_placement_aggregate = $::os_service_default,
|
||||
$placement_aggregate_required_for_tenants = $::os_service_default,
|
||||
$query_placement_for_availability_zone = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::nova::deps
|
||||
|
@ -74,6 +82,7 @@ class nova::scheduler(
|
|||
'scheduler/discover_hosts_in_cells_interval': value => $discover_hosts_in_cells_interval;
|
||||
'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/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.
|
|
@ -24,6 +24,7 @@ describe 'nova::scheduler' do
|
|||
it { is_expected.to contain_nova_config('scheduler/discover_hosts_in_cells_interval').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/query_placement_for_availability_zone').with_value('<SERVICE DEFAULT>') }
|
||||
|
||||
it { is_expected.to contain_class('nova::availability_zone') }
|
||||
|
||||
|
@ -86,6 +87,14 @@ describe 'nova::scheduler' do
|
|||
it { is_expected.to contain_nova_config('scheduler/placement_aggregate_required_for_tenants').with_value(true) }
|
||||
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
|
||||
let :pre_condition do
|
||||
"include nova"
|
||||
|
|
Loading…
Reference in New Issue