Browse Source

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)
changes/44/728044/2
Rajesh Tailor 1 year ago
parent
commit
12bf3df018
3 changed files with 33 additions and 10 deletions
  1. +17
    -9
      manifests/scheduler.pp
  2. +7
    -0
      releasenotes/notes/nova_scheduler_limit_tenants_to_placement_aggregate-8886c514f0ebbb72.yaml
  3. +9
    -1
      spec/classes/nova_scheduler_spec.rb

+ 17
- 9
manifests/scheduler.pp View File

@@ -29,13 +29,20 @@
# attempt to discover new hosts that have been added to cells.
# 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(
$enabled = true,
$manage_service = true,
$ensure_package = 'present',
$workers = $::os_workers,
$scheduler_driver = 'filter_scheduler',
$discover_hosts_in_cells_interval = $::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,
) {

include ::nova::deps
@@ -52,9 +59,10 @@ 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/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;
}

}

+ 7
- 0
releasenotes/notes/nova_scheduler_limit_tenants_to_placement_aggregate-8886c514f0ebbb72.yaml View File

@@ -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.

+ 9
- 1
spec/classes/nova_scheduler_spec.rb View File

@@ -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/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_class('nova::availability_zone') }

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) }
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
let :pre_condition do
"include nova"


Loading…
Cancel
Save