summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Schultz <aschultz@redhat.com>2017-03-17 16:21:12 -0600
committerAlex Schultz <aschultz@redhat.com>2017-03-17 16:25:56 -0600
commitb9d23caf895ec070976ea6d222b7f6f3f48939c8 (patch)
treecf9a89bf08e8bdc921b7cd3d44c42c161a441cb5
parentccdcbae82a5612a349f81e9cbfb927b8f04bb9dc (diff)
Update deprecated allocation ratios
The nova allocation ratio settings have been moved from the scheduler to the main nova class. They are being removed from the scheduler class and need to be passed to nova differently. Change-Id: I753c795ef62a505b7b2499b3805acb43d1f79b4d Closes-Bug: #1673893
Notes
Notes (review): Code-Review+1: Mykyta Karpin <mkarpin@mirantis.com> Code-Review+1: Michael Polenchuk <mpolenchuk@mirantis.com> Code-Review+1: Stanislaw Bogatkin <sbogatkin@mirantis.com> Code-Review+1: zhongshengping <chdzsp@163.com> Code-Review+2: Vladimir Kuklin <vkuklin@mirantis.com> Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Workflow+1: Sergii Golovatiuk <sgolovatiuk@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 20 Mar 2017 17:04:34 +0000 Reviewed-on: https://review.openstack.org/447156 Project: openstack/fuel-library Branch: refs/heads/master
-rw-r--r--deployment/puppet/openstack_tasks/manifests/openstack_controller/openstack_controller.pp6
-rw-r--r--tests/noop/spec/hosts/openstack-controller/openstack-controller_spec.rb8
2 files changed, 11 insertions, 3 deletions
diff --git a/deployment/puppet/openstack_tasks/manifests/openstack_controller/openstack_controller.pp b/deployment/puppet/openstack_tasks/manifests/openstack_controller/openstack_controller.pp
index ce3626c..5e18f27 100644
--- a/deployment/puppet/openstack_tasks/manifests/openstack_controller/openstack_controller.pp
+++ b/deployment/puppet/openstack_tasks/manifests/openstack_controller/openstack_controller.pp
@@ -188,6 +188,9 @@ class openstack_tasks::openstack_controller::openstack_controller {
188 rabbit_heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, 188 rabbit_heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
189 rabbit_heartbeat_rate => $rabbit_heartbeat_rate, 189 rabbit_heartbeat_rate => $rabbit_heartbeat_rate,
190 os_region_name => $region_name, 190 os_region_name => $region_name,
191 cpu_allocation_ratio => pick($nova_hash['cpu_allocation_ratio'], '8.0'),
192 disk_allocation_ratio => pick($nova_hash['disk_allocation_ratio'], '1.0'),
193 ram_allocation_ratio => pick($nova_hash['ram_allocation_ratio'], '1.0'),
191 } 194 }
192 195
193 # TODO(aschultz): this is being removed in M, do we need it? 196 # TODO(aschultz): this is being removed in M, do we need it?
@@ -383,9 +386,6 @@ class openstack_tasks::openstack_controller::openstack_controller {
383 } 386 }
384 387
385 class { '::nova::scheduler::filter': 388 class { '::nova::scheduler::filter':
386 cpu_allocation_ratio => pick($nova_hash['cpu_allocation_ratio'], '8.0'),
387 disk_allocation_ratio => pick($nova_hash['disk_allocation_ratio'], '1.0'),
388 ram_allocation_ratio => pick($nova_hash['ram_allocation_ratio'], '1.0'),
389 scheduler_host_subset_size => pick($nova_hash['scheduler_host_subset_size'], '30'), 389 scheduler_host_subset_size => pick($nova_hash['scheduler_host_subset_size'], '30'),
390 scheduler_default_filters => $nova_scheduler_filters, 390 scheduler_default_filters => $nova_scheduler_filters,
391 scheduler_host_manager => $scheduler_host_manager, 391 scheduler_host_manager => $scheduler_host_manager,
diff --git a/tests/noop/spec/hosts/openstack-controller/openstack-controller_spec.rb b/tests/noop/spec/hosts/openstack-controller/openstack-controller_spec.rb
index ac66e5f..3b23be2 100644
--- a/tests/noop/spec/hosts/openstack-controller/openstack-controller_spec.rb
+++ b/tests/noop/spec/hosts/openstack-controller/openstack-controller_spec.rb
@@ -260,6 +260,14 @@ describe manifest do
260 should contain_nova_config('keystone_authtoken/memcached_servers').with(:value => local_memcached_server) 260 should contain_nova_config('keystone_authtoken/memcached_servers').with(:value => local_memcached_server)
261 end 261 end
262 262
263 it 'should configure allocation ratios' do
264 should contain_class('nova').with(
265 :cpu_allocation_ratio => Noop.puppet_function('pick', nova_hash['cpu_allocation_ratio'], '8.0'),
266 :disk_allocation_ratio => Noop.puppet_function('pick', nova_hash['disk_allocation_ratio'], '1.0'),
267 :ram_allocation_ratio => Noop.puppet_function('pick', nova_hash['ram_allocation_ratio'], '1.0'),
268 )
269 end
270
263 it 'should configure nova::api' do 271 it 'should configure nova::api' do
264 # FIXME(aschultz): check rate limits 272 # FIXME(aschultz): check rate limits
265 should contain_class('nova::api').with( 273 should contain_class('nova::api').with(