Add parameter query_placement_for_routed_network_aggregates
Add parameter `query_placement_for_routed_network_aggregates` that allows the scheduler to look at the nova aggregates related to requested routed network segments. Change-Id: I1db6a5d92a56a1a768826b6a9434e2f3c2602eff
This commit is contained in:
parent
8ab07ef0a5
commit
1c8925468e
@ -74,6 +74,11 @@
|
||||
# aggregate.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*query_placement_for_routed_network_aggregates*]
|
||||
# (Optional) This setting allows to enable the scheduler to filter
|
||||
# compute hosts affined to routed network segment aggregates.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*scheduler_driver*]
|
||||
@ -81,21 +86,22 @@
|
||||
# Defaults to undef
|
||||
#
|
||||
class nova::scheduler(
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$workers = $::os_workers,
|
||||
$max_attempts = $::os_service_default,
|
||||
$periodic_task_interval = $::os_service_default,
|
||||
$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,
|
||||
$placement_aggregate_required_for_tenants = $::os_service_default,
|
||||
$max_placement_results = $::os_service_default,
|
||||
$enable_isolated_aggregate_filtering = $::os_service_default,
|
||||
$query_placement_for_availability_zone = $::os_service_default,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$workers = $::os_workers,
|
||||
$max_attempts = $::os_service_default,
|
||||
$periodic_task_interval = $::os_service_default,
|
||||
$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,
|
||||
$placement_aggregate_required_for_tenants = $::os_service_default,
|
||||
$max_placement_results = $::os_service_default,
|
||||
$enable_isolated_aggregate_filtering = $::os_service_default,
|
||||
$query_placement_for_availability_zone = $::os_service_default,
|
||||
$query_placement_for_routed_network_aggregates = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$scheduler_driver = undef,
|
||||
$scheduler_driver = undef,
|
||||
) {
|
||||
|
||||
include nova::deps
|
||||
@ -117,16 +123,17 @@ class nova::scheduler(
|
||||
$periodic_task_interval_real = pick($::nova::scheduler::filter::periodic_task_interval, $periodic_task_interval)
|
||||
|
||||
nova_config {
|
||||
'scheduler/workers': value => $workers;
|
||||
'scheduler/max_attempts': value => $max_attempts_real;
|
||||
'scheduler/periodic_task_interval': value => $periodic_task_interval_real;
|
||||
'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/placement_aggregate_required_for_tenants': value => $placement_aggregate_required_for_tenants;
|
||||
'scheduler/max_placement_results': value => $max_placement_results;
|
||||
'scheduler/enable_isolated_aggregate_filtering': value => $enable_isolated_aggregate_filtering;
|
||||
'scheduler/query_placement_for_availability_zone': value => $query_placement_for_availability_zone;
|
||||
'scheduler/workers': value => $workers;
|
||||
'scheduler/max_attempts': value => $max_attempts_real;
|
||||
'scheduler/periodic_task_interval': value => $periodic_task_interval_real;
|
||||
'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/placement_aggregate_required_for_tenants': value => $placement_aggregate_required_for_tenants;
|
||||
'scheduler/max_placement_results': value => $max_placement_results;
|
||||
'scheduler/enable_isolated_aggregate_filtering': value => $enable_isolated_aggregate_filtering;
|
||||
'scheduler/query_placement_for_availability_zone': value => $query_placement_for_availability_zone;
|
||||
'scheduler/query_placement_for_routed_network_aggregates': value => $query_placement_for_routed_network_aggregates;
|
||||
}
|
||||
|
||||
if $scheduler_driver != undef {
|
||||
|
@ -0,0 +1,14 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Add parameter `query_placement_for_routed_network_aggregates` that allows
|
||||
the scheduler to verify if the requested networks or the port are
|
||||
related to Neutron `routed networks` _ with some specific segments to use.
|
||||
In this case, the routed networks prefilter will require the related
|
||||
aggregates to be reported in Placement, so only hosts within the asked
|
||||
aggregates would be accepted.
|
||||
In order to support this behaviour, operators need to set the
|
||||
``[scheduler]/query_placement_for_routed_network_aggregates`` configuration
|
||||
option which defaults to ``False``.
|
||||
|
||||
.. _`routed networks`: https://docs.openstack.org/neutron/latest/admin/config-routed-networks.html
|
@ -28,6 +28,7 @@ describe 'nova::scheduler' do
|
||||
it { is_expected.to contain_nova_config('scheduler/max_placement_results').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('scheduler/enable_isolated_aggregate_filtering').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('scheduler/query_placement_for_availability_zone').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('scheduler/query_placement_for_routed_network_aggregates').with_value('<SERVICE DEFAULT>') }
|
||||
|
||||
it { is_expected.to contain_class('nova::availability_zone') }
|
||||
|
||||
@ -138,6 +139,14 @@ describe 'nova::scheduler' do
|
||||
it { is_expected.to contain_nova_config('scheduler/query_placement_for_availability_zone').with_value(true) }
|
||||
end
|
||||
|
||||
context 'with query_placement_for_routed_network_aggregates' do
|
||||
let :params do
|
||||
{ :query_placement_for_routed_network_aggregates => true }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_nova_config('scheduler/query_placement_for_routed_network_aggregates').with_value(true) }
|
||||
end
|
||||
|
||||
context 'with default database parameters' do
|
||||
let :pre_condition do
|
||||
"include nova::db"
|
||||
|
Loading…
Reference in New Issue
Block a user