Add support for filter_scheduler/shuffle_best_same_weighed_hosts

Change-Id: Id78ba11e5037f67eab76138725e727a4c10aa537
This commit is contained in:
Takashi Kajinami 2020-10-02 15:40:48 +09:00
parent 53ad262c86
commit 349d87d783
3 changed files with 17 additions and 0 deletions

View File

@ -75,6 +75,11 @@
# failures
# Defaults to $::os_service_default
#
# [*shuffle_best_same_weighed_hosts*]
# (Optional) Enabled spreading the instances between hosts with the same
# best weight
# Defaults to $::os_service_default
#
# [*restrict_isolated_hosts_to_isolated_images*]
# (optional) Prevent non-isolated images from being built on isolated hosts.
# Defaults to $::os_service_default
@ -116,6 +121,7 @@ class nova::scheduler::filter (
$soft_affinity_weight_multiplier = $::os_service_default,
$soft_anti_affinity_weight_multiplier = $::os_service_default,
$build_failure_weight_multiplier = $::os_service_default,
$shuffle_best_same_weighed_hosts = $::os_service_default,
$restrict_isolated_hosts_to_isolated_images = $::os_service_default,
$aggregate_image_properties_isolation_namespace = $::os_service_default,
$aggregate_image_properties_isolation_separator = $::os_service_default,
@ -204,6 +210,8 @@ will be removed in a future release. Use the nova::scheduler::periodic_task_inte
value => $soft_anti_affinity_weight_multiplier;
'filter_scheduler/build_failure_weight_multiplier':
value => $build_failure_weight_multiplier;
'filter_scheduler/shuffle_best_same_weighed_hosts':
value => $shuffle_best_same_weighed_hosts;
'filter_scheduler/restrict_isolated_hosts_to_isolated_images':
value => $restrict_isolated_hosts_to_isolated_images;
'filter_scheduler/aggregate_image_properties_isolation_namespace':

View File

@ -0,0 +1,6 @@
---
features:
- |
The new ``nova::scheduler::filter::shuffle_best_same_weighed_hosts``
parameter has been added, to manage the corresponding parameter in
nova-scheduler.

View File

@ -25,6 +25,7 @@ describe 'nova::scheduler::filter' do
it { is_expected.to contain_nova_config('filter_scheduler/soft_affinity_weight_multiplier').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('filter_scheduler/soft_anti_affinity_weight_multiplier').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('filter_scheduler/build_failure_weight_multiplier').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('filter_scheduler/shuffle_best_same_weighed_hosts').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('filter_scheduler/restrict_isolated_hosts_to_isolated_images').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('filter_scheduler/aggregate_image_properties_isolation_namespace').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('filter_scheduler/aggregate_image_properties_isolation_separator').with_value('<SERVICE DEFAULT>') }
@ -53,6 +54,7 @@ describe 'nova::scheduler::filter' do
:soft_affinity_weight_multiplier => 50,
:soft_anti_affinity_weight_multiplier => 60,
:build_failure_weight_multiplier => 100,
:shuffle_best_same_weighed_hosts => true,
}
end
@ -67,6 +69,7 @@ describe 'nova::scheduler::filter' do
it { is_expected.to contain_nova_config('filter_scheduler/soft_affinity_weight_multiplier').with_value(50) }
it { is_expected.to contain_nova_config('filter_scheduler/soft_anti_affinity_weight_multiplier').with_value(60) }
it { is_expected.to contain_nova_config('filter_scheduler/build_failure_weight_multiplier').with_value(100) }
it { is_expected.to contain_nova_config('filter_scheduler/shuffle_best_same_weighed_hosts').with_value(true) }
it { is_expected.to contain_nova_config('filter_scheduler/isolated_images').with_value('ubuntu1,centos2') }
it { is_expected.to contain_nova_config('filter_scheduler/isolated_hosts').with_value('192.168.1.2,192.168.1.3') }
it { is_expected.to contain_nova_config('filter_scheduler/enabled_filters').with_value('RetryFilter,AvailabilityZoneFilter') }