Expose placement_aggregate_required_for_tenants parameter
Add support for configuring scheduler parameter option
`placement_aggregate_required_for_tenants` which controls
whether or not a tenant with no aggregate affinity will be
allowed to schedule to any available node.
Conflicts:
manifests/scheduler.pp
spec/classes/nova_scheduler_spec.rb
Resolved conflicts occured because of missing change
I6652b1321dd64f428fff2bc920f65e09e294ddfe
Change-Id: I61e3784ff40665ced25a52f864455c2a3518def0
(cherry picked from commit 23c242c16e
)
This commit is contained in:
parent
7f77f54053
commit
bb7b7d34f8
|
@ -41,15 +41,25 @@
|
|||
# zones will only be available to specific set of tenants.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*placement_aggregate_required_for_tenants*]
|
||||
# (Optional) This setting controls if a tenant with no aggregate affinity
|
||||
# will be allowed to schedule to any availalbe node when
|
||||
# ``limit_tenants_to_placement_aggregate`` is set to True.
|
||||
# If aggregates are used to limit some tenants but not all, then this should
|
||||
# be False.
|
||||
# If all tenants should be confined via aggregate, then this should be True.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class nova::scheduler(
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$workers = $::os_workers,
|
||||
$scheduler_driver = 'filter_scheduler',
|
||||
$discover_hosts_in_cells_interval = $::os_service_default,
|
||||
$query_placement_for_image_type_support = $::os_service_default,
|
||||
$limit_tenants_to_placement_aggregate = $::os_service_default,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$workers = $::os_workers,
|
||||
$scheduler_driver = 'filter_scheduler',
|
||||
$discover_hosts_in_cells_interval = $::os_service_default,
|
||||
$query_placement_for_image_type_support = $::os_service_default,
|
||||
$limit_tenants_to_placement_aggregate = $::os_service_default,
|
||||
$placement_aggregate_required_for_tenants = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::nova::deps
|
||||
|
@ -66,11 +76,12 @@ class nova::scheduler(
|
|||
}
|
||||
|
||||
nova_config {
|
||||
'scheduler/workers': value => $workers;
|
||||
'scheduler/driver': value => $scheduler_driver;
|
||||
'scheduler/discover_hosts_in_cells_interval': value => $discover_hosts_in_cells_interval;
|
||||
'scheduler/query_placement_for_image_type_support': value => $query_placement_for_image_type_support;
|
||||
'scheduler/limit_tenants_to_placement_aggregate': value => $limit_tenants_to_placement_aggregate;
|
||||
'scheduler/workers': value => $workers;
|
||||
'scheduler/driver': value => $scheduler_driver;
|
||||
'scheduler/discover_hosts_in_cells_interval': value => $discover_hosts_in_cells_interval;
|
||||
'scheduler/query_placement_for_image_type_support': value => $query_placement_for_image_type_support;
|
||||
'scheduler/limit_tenants_to_placement_aggregate': value => $limit_tenants_to_placement_aggregate;
|
||||
'scheduler/placement_aggregate_required_for_tenants': value => $placement_aggregate_required_for_tenants;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Add parameter `placement_aggregate_required_for_tenants` which controls
|
||||
whether or not a tenant with no aggregate affinity will be allowed to
|
||||
schedule to any available node, when `limit_tenants_to_placement_aggregate`
|
||||
is set to True.
|
||||
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/query_placement_for_image_type_support').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_class('nova::availability_zone') }
|
||||
|
||||
|
@ -86,6 +87,14 @@ describe 'nova::scheduler' do
|
|||
it { is_expected.to contain_nova_config('scheduler/limit_tenants_to_placement_aggregate').with_value(true) }
|
||||
end
|
||||
|
||||
context 'with placement_aggregate_required_for_tenants' do
|
||||
let :params do
|
||||
{ :placement_aggregate_required_for_tenants => true }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_nova_config('scheduler/placement_aggregate_required_for_tenants').with_value(true) }
|
||||
end
|
||||
|
||||
context 'with default database parameters' do
|
||||
let :pre_condition do
|
||||
"include nova"
|
||||
|
|
Loading…
Reference in New Issue