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 I6d895a4789f44380565e3d2e3461d0bbb501c86b Change-Id: I61e3784ff40665ced25a52f864455c2a3518def0 (cherry picked from commit23c242c16e
) (cherry picked from commitbb7b7d34f8
)
This commit is contained in:
parent
12bf3df018
commit
e6e747272a
|
@ -35,14 +35,24 @@
|
|||
# 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,
|
||||
$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,
|
||||
$limit_tenants_to_placement_aggregate = $::os_service_default,
|
||||
$placement_aggregate_required_for_tenants = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::nova::deps
|
||||
|
@ -59,10 +69,11 @@ 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/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/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.
|
||||
|
|
@ -23,6 +23,8 @@ describe 'nova::scheduler' do
|
|||
it { is_expected.to contain_nova_config('scheduler/driver').with_value('filter_scheduler') }
|
||||
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_class('nova::availability_zone') }
|
||||
|
||||
context 'with manage_service as false' do
|
||||
|
@ -76,6 +78,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