commit 349d87d783942382a033bcd06dc43560a48705cc Author: Takashi Kajinami Date: Fri Oct 2 15:40:48 2020 +0900 Add support for filter_scheduler/shuffle_best_same_weighed_hosts Change-Id: Id78ba11e5037f67eab76138725e727a4c10aa537 diff --git a/manifests/scheduler/filter.pp b/manifests/scheduler/filter.pp index 1f89fea..edbeb07 100644 --- a/manifests/scheduler/filter.pp +++ b/manifests/scheduler/filter.pp @@ -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': diff --git a/releasenotes/notes/releasenotes/notes/scheduler-filter-shuffle_best_same_weighed_hosts-eb328a7d95a0081b.yaml b/releasenotes/notes/releasenotes/notes/scheduler-filter-shuffle_best_same_weighed_hosts-eb328a7d95a0081b.yaml new file mode 100644 index 0000000..51b665f --- /dev/null +++ b/releasenotes/notes/releasenotes/notes/scheduler-filter-shuffle_best_same_weighed_hosts-eb328a7d95a0081b.yaml @@ -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. diff --git a/spec/classes/nova_scheduler_filter_spec.rb b/spec/classes/nova_scheduler_filter_spec.rb index 7ec94ca..df36aa3 100644 --- a/spec/classes/nova_scheduler_filter_spec.rb +++ b/spec/classes/nova_scheduler_filter_spec.rb @@ -25,6 +25,7 @@ describe 'nova::scheduler::filter' do it { is_expected.to contain_nova_config('filter_scheduler/soft_affinity_weight_multiplier').with_value('') } it { is_expected.to contain_nova_config('filter_scheduler/soft_anti_affinity_weight_multiplier').with_value('') } it { is_expected.to contain_nova_config('filter_scheduler/build_failure_weight_multiplier').with_value('') } + it { is_expected.to contain_nova_config('filter_scheduler/shuffle_best_same_weighed_hosts').with_value('') } it { is_expected.to contain_nova_config('filter_scheduler/restrict_isolated_hosts_to_isolated_images').with_value('') } it { is_expected.to contain_nova_config('filter_scheduler/aggregate_image_properties_isolation_namespace').with_value('') } it { is_expected.to contain_nova_config('filter_scheduler/aggregate_image_properties_isolation_separator').with_value('') } @@ -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') }