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. Change-Id: I61e3784ff40665ced25a52f864455c2a3518def0
This commit is contained in:
@@ -41,21 +41,31 @@
|
|||||||
# zones will only be available to specific set of tenants.
|
# zones will only be available to specific set of tenants.
|
||||||
# Defaults to $::os_service_default
|
# 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
|
||||||
|
#
|
||||||
# [*max_placement_results*]
|
# [*max_placement_results*]
|
||||||
# (Optional) This setting determines the maximum limit on results received
|
# (Optional) This setting determines the maximum limit on results received
|
||||||
# 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
|
||||||
#
|
#
|
||||||
class nova::scheduler(
|
class nova::scheduler(
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
$ensure_package = 'present',
|
$ensure_package = 'present',
|
||||||
$workers = $::os_workers,
|
$workers = $::os_workers,
|
||||||
$scheduler_driver = 'filter_scheduler',
|
$scheduler_driver = 'filter_scheduler',
|
||||||
$discover_hosts_in_cells_interval = $::os_service_default,
|
$discover_hosts_in_cells_interval = $::os_service_default,
|
||||||
$query_placement_for_image_type_support = $::os_service_default,
|
$query_placement_for_image_type_support = $::os_service_default,
|
||||||
$limit_tenants_to_placement_aggregate = $::os_service_default,
|
$limit_tenants_to_placement_aggregate = $::os_service_default,
|
||||||
$max_placement_results = $::os_service_default,
|
$placement_aggregate_required_for_tenants = $::os_service_default,
|
||||||
|
$max_placement_results = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
@@ -72,11 +82,12 @@ class nova::scheduler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
'scheduler/workers': value => $workers;
|
'scheduler/workers': value => $workers;
|
||||||
'scheduler/driver': value => $scheduler_driver;
|
'scheduler/driver': value => $scheduler_driver;
|
||||||
'scheduler/discover_hosts_in_cells_interval': value => $discover_hosts_in_cells_interval;
|
'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/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/limit_tenants_to_placement_aggregate': value => $limit_tenants_to_placement_aggregate;
|
||||||
'scheduler/max_placement_results': value => $max_placement_results;
|
'scheduler/placement_aggregate_required_for_tenants': value => $placement_aggregate_required_for_tenants;
|
||||||
|
'scheduler/max_placement_results': value => $max_placement_results;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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.
|
||||||
|
|
@@ -22,6 +22,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/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/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/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/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_class('nova::availability_zone') }
|
it { is_expected.to contain_class('nova::availability_zone') }
|
||||||
@@ -85,6 +86,14 @@ describe 'nova::scheduler' do
|
|||||||
it { is_expected.to contain_nova_config('scheduler/limit_tenants_to_placement_aggregate').with_value(true) }
|
it { is_expected.to contain_nova_config('scheduler/limit_tenants_to_placement_aggregate').with_value(true) }
|
||||||
end
|
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 max_placement_results' do
|
context 'with max_placement_results' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :max_placement_results => 10 }
|
{ :max_placement_results => 10 }
|
||||||
|
Reference in New Issue
Block a user