From 733c6367f599619c1baa76a6ac839642fcae4ff3 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Fri, 17 Mar 2017 15:09:32 +0000 Subject: [PATCH] remove deprecated scheduler filter parameters The following parameters were moved top level during the Newton cycle and I propose these are now removed: cpu_allocation_ratio ram_allocation_ratio disk_allocation_ratio Change-Id: Ib028bad7d5edce4bb14359388558502f3745599d Closes-Bug: #1673781 --- manifests/init.pp | 17 ++++------- manifests/scheduler/filter.pp | 30 ------------------- ...ed_scheduler_filters-2c571c2e7a6a52e1.yaml | 4 +++ 3 files changed, 10 insertions(+), 41 deletions(-) create mode 100644 releasenotes/notes/remove_deprecated_scheduler_filters-2c571c2e7a6a52e1.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 140988a6b..1d29dbed2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -647,18 +647,13 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") } } - # maintain backwards compatibility - $real_cpu_allocation_ratio = pick($::nova::scheduler::filter::cpu_allocation_ratio, $cpu_allocation_ratio) - ensure_resource('nova_config', 'DEFAULT/cpu_allocation_ratio', { value => $real_cpu_allocation_ratio }) - $real_ram_allocation_ratio = pick($::nova::scheduler::filter::ram_allocation_ratio, $ram_allocation_ratio) - ensure_resource('nova_config', 'DEFAULT/ram_allocation_ratio', { value => $real_ram_allocation_ratio }) - $real_disk_allocation_ratio = pick($::nova::scheduler::filter::disk_allocation_ratio, $disk_allocation_ratio) - ensure_resource('nova_config', 'DEFAULT/disk_allocation_ratio', { value => $real_disk_allocation_ratio }) - nova_config { - 'api/auth_strategy': value => $auth_strategy; - 'DEFAULT/image_service': value => $image_service; - 'DEFAULT/host': value => $host; + 'api/auth_strategy': value => $auth_strategy; + 'DEFAULT/image_service': value => $image_service; + 'DEFAULT/host': value => $host; + 'DEFAULT/cpu_allocation_ratio': value => $cpu_allocation_ratio; + 'DEFAULT/ram_allocation_ratio': value => $ram_allocation_ratio; + 'DEFAULT/disk_allocation_ratio': value => $disk_allocation_ratio; } # we keep "nova.openstack.common.rpc.impl_kombu" for backward compatibility diff --git a/manifests/scheduler/filter.pp b/manifests/scheduler/filter.pp index 128974f94..7b7f60ab4 100644 --- a/manifests/scheduler/filter.pp +++ b/manifests/scheduler/filter.pp @@ -99,20 +99,6 @@ # (optional) Separator character(s) for image property namespace and name # Defaults to $::os_service_default # -# DEPRECATED PARAMETERS -# -# [*cpu_allocation_ratio*] -# (optional) Virtual CPU to Physical CPU allocation ratio -# Defaults to undef -# -# [*ram_allocation_ratio*] -# (optional) Virtual ram to physical ram allocation ratio -# Defaults to undef -# -# [*disk_allocation_ratio*] -# (optional) Virtual disk to physical disk allocation ratio -# Defaults to undef -# class nova::scheduler::filter ( $scheduler_host_manager = 'host_manager', $scheduler_max_attempts = '3', @@ -136,10 +122,6 @@ class nova::scheduler::filter ( $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, - # DEPRECATED PARAMETERS - $cpu_allocation_ratio = undef, - $ram_allocation_ratio = undef, - $disk_allocation_ratio = undef, ) { include ::nova::deps @@ -185,18 +167,6 @@ class nova::scheduler::filter ( $isolated_hosts_real = $::os_service_default } - if $cpu_allocation_ratio { - warning('cpu_allocation_ratio is deprecated in nova::scheduler::filter, please add to nova::init instead') - } - - if $ram_allocation_ratio { - warning('ram_allocation_ratio is deprecated in nova::scheduler::filter, please add to nova::init instead') - } - - if $disk_allocation_ratio { - warning('disk_allocation_ratio is deprecated in nova::scheduler::filter, please add to nova::init instead') - } - # TODO(aschultz): these should probably be in nova::scheduler ... nova_config { 'scheduler/host_manager': value => $scheduler_host_manager; diff --git a/releasenotes/notes/remove_deprecated_scheduler_filters-2c571c2e7a6a52e1.yaml b/releasenotes/notes/remove_deprecated_scheduler_filters-2c571c2e7a6a52e1.yaml new file mode 100644 index 000000000..190b224c1 --- /dev/null +++ b/releasenotes/notes/remove_deprecated_scheduler_filters-2c571c2e7a6a52e1.yaml @@ -0,0 +1,4 @@ +--- +other: + - ram, cpu and disk filters were moved top level in + newton so are removed from scheduler filter.