Expose limit_tenants_to_placement_aggregate parameter
Add support for configuring scheduler parameter option
'limit_tenants_to_placement_aggregate' to enable tenant
isolation with placement.
Conflicts:
manifests/scheduler.pp
spec/classes/nova_scheduler_spec.rb
Resolved conflict occure due to missing change
I6d895a4789f44380565e3d2e3461d0bbb501c86b in stein.
Change-Id: I37ce0633b3b56563f373fadfb74820b2896d6734
(cherry picked from commit 09b5d82294
)
This commit is contained in:
parent
eb993b4102
commit
12bf3df018
|
@ -29,13 +29,20 @@
|
||||||
# attempt to discover new hosts that have been added to cells.
|
# attempt to discover new hosts that have been added to cells.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*limit_tenants_to_placement_aggregate*]
|
||||||
|
# (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
|
||||||
|
#
|
||||||
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,
|
||||||
|
$limit_tenants_to_placement_aggregate = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::nova::deps
|
include ::nova::deps
|
||||||
|
@ -52,9 +59,10 @@ 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/limit_tenants_to_placement_aggregate': value => $limit_tenants_to_placement_aggregate;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Add parameter `limit_tenants_to_placement_aggregate` which allows
|
||||||
|
to have tenant isolation with placement. It ensures hosts are in
|
||||||
|
tenant-isolated host aggregate and availability zones will only be
|
||||||
|
available to specific set of tenants.
|
|
@ -22,7 +22,7 @@ describe 'nova::scheduler' do
|
||||||
it { is_expected.to contain_nova_config('scheduler/workers').with_value(4) }
|
it { is_expected.to contain_nova_config('scheduler/workers').with_value(4) }
|
||||||
it { is_expected.to contain_nova_config('scheduler/driver').with_value('filter_scheduler') }
|
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/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_class('nova::availability_zone') }
|
it { is_expected.to contain_class('nova::availability_zone') }
|
||||||
|
|
||||||
context 'with manage_service as false' do
|
context 'with manage_service as false' do
|
||||||
|
@ -68,6 +68,14 @@ describe 'nova::scheduler' do
|
||||||
it { is_expected.to contain_nova_config('scheduler/discover_hosts_in_cells_interval').with_value(15) }
|
it { is_expected.to contain_nova_config('scheduler/discover_hosts_in_cells_interval').with_value(15) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with limit_tenants_to_placement_aggregate' do
|
||||||
|
let :params do
|
||||||
|
{ :limit_tenants_to_placement_aggregate => true }
|
||||||
|
end
|
||||||
|
|
||||||
|
it { is_expected.to contain_nova_config('scheduler/limit_tenants_to_placement_aggregate').with_value(true) }
|
||||||
|
end
|
||||||
|
|
||||||
context 'with default database parameters' do
|
context 'with default database parameters' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"include nova"
|
"include nova"
|
||||||
|
|
Loading…
Reference in New Issue