From 411af912378a1e2a5e750ed03b5fb164fd4c65f2 Mon Sep 17 00:00:00 2001 From: Rajesh Tailor Date: Wed, 8 Apr 2020 12:24:00 +0530 Subject: [PATCH] Add new parameter NovaSchedulerEnableIsolatedAggregateFiltering Add new paramter NovaSchedulerEnableIsolatedAggregateFiltering allows for configuring `scheduler/enable_isolated_aggregate_filtering` parameter to restrict hosts in aggregates based on matching required traits in the aggregate metadata and the instance flavor/image. Also this fixes the typo in scheduler spelling in config_settings section for placement_aggregate_required_for_tenants parameter. Depends-On: https://review.opendev.org/#/c/718326/ Change-Id: Ic6ef33d9c02be7e87c30626930f9e3d44cb77875 --- .../nova/nova-scheduler-container-puppet.yaml | 13 ++++++++++++- ...olated_aggregate_filtering-2aec5a693bf79852.yaml | 12 ++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/enable_isolated_aggregate_filtering-2aec5a693bf79852.yaml diff --git a/deployment/nova/nova-scheduler-container-puppet.yaml b/deployment/nova/nova-scheduler-container-puppet.yaml index 0f9f5e1639..a49ca676ce 100644 --- a/deployment/nova/nova-scheduler-container-puppet.yaml +++ b/deployment/nova/nova-scheduler-container-puppet.yaml @@ -97,6 +97,16 @@ parameters: If aggregates are used to limit some tenants but not all, then this should be False. If all tenants should be confined via aggregate, then this should be True. type: boolean + NovaSchedulerEnableIsolatedAggregateFiltering: + default: false + description: > + This setting allows the scheduler to restrict hosts in aggregates based on + matching required traits in the aggregate metadata and the instance flavor/image. + If an aggregate is configured with a property with key trait:$TRAIT_NAME and value + required, the instance flavor extra_specs and/or image metadata must also contain + trait:$TRAIT_NAME=required to be eligible to be scheduled to hosts in that aggregate. + type: boolean + conditions: nova_scheduler_workers_zero: {equals : [{get_param: NovaSchedulerWorkers}, 0]} @@ -142,7 +152,8 @@ outputs: nova::scheduler::discover_hosts_in_cells_interval: {get_param: NovaSchedulerDiscoverHostsInCellsInterval} nova::scheduler::query_placement_for_image_type_support: {get_param: NovaSchedulerQueryImageType} nova::scheduler::limit_tenants_to_placement_aggregate: {get_param: NovaSchedulerLimitTenantsToPlacementAggregate} - nova::schedule::placement_aggregate_required_for_tenants: {get_param: NovaSchedulePlacementAggregateRequiredForTenants} + nova::scheduler::placement_aggregate_required_for_tenants: {get_param: NovaSchedulePlacementAggregateRequiredForTenants} + nova::scheduler::enable_isolated_aggregate_filtering: {get_param: NovaSchedulerEnableIsolatedAggregateFiltering} - if: - nova_scheduler_workers_zero diff --git a/releasenotes/notes/enable_isolated_aggregate_filtering-2aec5a693bf79852.yaml b/releasenotes/notes/enable_isolated_aggregate_filtering-2aec5a693bf79852.yaml new file mode 100644 index 0000000000..e83e742802 --- /dev/null +++ b/releasenotes/notes/enable_isolated_aggregate_filtering-2aec5a693bf79852.yaml @@ -0,0 +1,12 @@ +--- +features: + - | + Add boolean parameter `NovaSchedulerEnableIsolatedAggregateFiltering` + which allows to set `scheduler/enable_isolated_aggregate_filtering` + parameter. This configures scheduler to restrict hosts in aggregates based + on matching required traits in the aggregate metadata and the instance + flavor/image. If an aggregate is configured with a property with key + trait:$TRAIT_NAME and value required, the instance flavor extra_specs + and/or image metadata must also contain trait:$TRAIT_NAME=required to + be eligible to be scheduled to hosts in that aggregate. + Default value for NovaSchedulerEnableIsolatedAggregateFiltering is False.