Merge "Add scheduler max_placement_results param"
This commit is contained in:
commit
87236447b0
|
@ -5,42 +5,47 @@
|
|||
# === Parameters:
|
||||
#
|
||||
# [*enabled*]
|
||||
# (optional) Whether to run the scheduler service
|
||||
# (Optional) Whether to run the scheduler service
|
||||
# Defaults to true
|
||||
#
|
||||
# [*manage_service*]
|
||||
# (optional) Whether to start/stop the service
|
||||
# (Optional) Whether to start/stop the service
|
||||
# Defaults to true
|
||||
#
|
||||
# [*ensure_package*]
|
||||
# (optional) The state of the scheduler package
|
||||
# (Optional) The state of the scheduler package
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*workers*]
|
||||
# (optional) The amount of scheduler workers.
|
||||
# (Optional) The amount of scheduler workers.
|
||||
# Defaults to $::os_workers
|
||||
#
|
||||
# [*scheduler_driver*]
|
||||
# (optional) Default driver to use for the scheduler
|
||||
# (Optional) Default driver to use for the scheduler
|
||||
# Defaults to 'filter_scheduler'
|
||||
#
|
||||
# [*discover_hosts_in_cells_interval*]
|
||||
# (optional) This value controls how often (in seconds) the scheduler should
|
||||
# (Optional) This value controls how often (in seconds) the scheduler should
|
||||
# attempt to discover new hosts that have been added to cells.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*query_placement_for_image_type_support*]
|
||||
# (optional) This setting causes the scheduler to ask placement only for
|
||||
# (Optional) This setting causes the scheduler to ask placement only for
|
||||
# compute hosts that support the ``disk_format`` of the image used in the
|
||||
# request.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*limit_tenants_to_placement_aggregate*]
|
||||
# (optional) This setting allows to have tenant isolation with placement.
|
||||
# (Optional) This setting allows to have tenant isolation with placement.
|
||||
# It ensures hosts in tenant-isolated host aggregate and availability
|
||||
# zones will only be available to specific set of tenants.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*max_placement_results*]
|
||||
# (Optional) This setting determines the maximum limit on results received
|
||||
# from the placement service during a scheduling operation.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class nova::scheduler(
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
|
@ -50,6 +55,7 @@ class nova::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,
|
||||
$max_placement_results = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::nova::deps
|
||||
|
@ -71,6 +77,6 @@ class nova::scheduler(
|
|||
'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/max_placement_results': value => $max_placement_results;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Added nova::scheduler::max_placement_results parameter.
|
|
@ -1,13 +1,11 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'nova::scheduler' do
|
||||
|
||||
let :pre_condition do
|
||||
'include nova'
|
||||
end
|
||||
|
||||
shared_examples 'nova-scheduler' do
|
||||
|
||||
shared_examples 'nova::scheduler' do
|
||||
it { is_expected.to contain_package('nova-scheduler').with(
|
||||
:name => platform_params[:scheduler_package_name],
|
||||
:ensure => 'present'
|
||||
|
@ -23,7 +21,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/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/max_placement_results').with_value('<SERVICE DEFAULT>') }
|
||||
|
||||
it { is_expected.to contain_class('nova::availability_zone') }
|
||||
|
||||
|
@ -86,6 +85,14 @@ describe 'nova::scheduler' do
|
|||
it { is_expected.to contain_nova_config('scheduler/limit_tenants_to_placement_aggregate').with_value(true) }
|
||||
end
|
||||
|
||||
context 'with max_placement_results' do
|
||||
let :params do
|
||||
{ :max_placement_results => 10 }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_nova_config('scheduler/max_placement_results').with_value(10) }
|
||||
end
|
||||
|
||||
context 'with default database parameters' do
|
||||
let :pre_condition do
|
||||
"include nova"
|
||||
|
@ -134,8 +141,7 @@ describe 'nova::scheduler' do
|
|||
end
|
||||
end
|
||||
|
||||
it_configures 'nova-scheduler'
|
||||
it_behaves_like 'nova::scheduler'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue