Expose nova::scheduler::discover_hosts_in_cells_interval option
Starting with the Ocata release, bare metal nodes are no longer get recognized by nova automatically. To avoid forcing users into running nova manage command each time they enroll a node, we will have to allow enable the periodic task to do so. This option configures it. Change-Id: I1f0e40474018de593cb3f8798b5212285f5629a4 Closes-Bug: #1697724
This commit is contained in:
parent
9597cf9480
commit
8c8d795067
@ -20,11 +20,17 @@
|
||||
# (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
|
||||
# attept to discover new hosts that have been added to cells.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class nova::scheduler(
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$scheduler_driver = 'filter_scheduler',
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$scheduler_driver = 'filter_scheduler',
|
||||
$discover_hosts_in_cells_interval = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::nova::deps
|
||||
@ -40,7 +46,8 @@ class nova::scheduler(
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'scheduler/driver': value => $scheduler_driver;
|
||||
'scheduler/driver': value => $scheduler_driver;
|
||||
'scheduler/discover_hosts_in_cells_interval': value => $discover_hosts_in_cells_interval;
|
||||
}
|
||||
|
||||
# TODO(aschultz): old options, remove in P
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Expose the ``discover_hosts_in_cells_interval`` option in the scheduler
|
||||
manifest. Changing this option is needed for bare metal clouds starting
|
||||
with the Ocata release.
|
@ -22,6 +22,7 @@ describe 'nova::scheduler' do
|
||||
|
||||
it { is_expected.to contain_nova_config('DEFAULT/scheduler_driver').with_ensure('absent') }
|
||||
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>') }
|
||||
|
||||
context 'with manage_service as false' do
|
||||
let :params do
|
||||
@ -50,6 +51,14 @@ describe 'nova::scheduler' do
|
||||
it { is_expected.to contain_nova_config('scheduler/driver').with_value('custom driver') }
|
||||
end
|
||||
|
||||
context 'with discover_hosts_in_cells_interval' do
|
||||
let :params do
|
||||
{ :discover_hosts_in_cells_interval => 15 }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_nova_config('scheduler/discover_hosts_in_cells_interval').with_value(15) }
|
||||
end
|
||||
|
||||
context 'with default database parameters' do
|
||||
let :pre_condition do
|
||||
"include nova"
|
||||
|
Loading…
Reference in New Issue
Block a user