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 ce3626c15a..5e18f2778b 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 { rabbit_heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, rabbit_heartbeat_rate => $rabbit_heartbeat_rate, os_region_name => $region_name, + cpu_allocation_ratio => pick($nova_hash['cpu_allocation_ratio'], '8.0'), + disk_allocation_ratio => pick($nova_hash['disk_allocation_ratio'], '1.0'), + ram_allocation_ratio => pick($nova_hash['ram_allocation_ratio'], '1.0'), } # TODO(aschultz): this is being removed in M, do we need it? @@ -383,9 +386,6 @@ class openstack_tasks::openstack_controller::openstack_controller { } class { '::nova::scheduler::filter': - cpu_allocation_ratio => pick($nova_hash['cpu_allocation_ratio'], '8.0'), - disk_allocation_ratio => pick($nova_hash['disk_allocation_ratio'], '1.0'), - ram_allocation_ratio => pick($nova_hash['ram_allocation_ratio'], '1.0'), scheduler_host_subset_size => pick($nova_hash['scheduler_host_subset_size'], '30'), scheduler_default_filters => $nova_scheduler_filters, 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 ac66e5fb7c..3b23be29e4 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 should contain_nova_config('keystone_authtoken/memcached_servers').with(:value => local_memcached_server) end + it 'should configure allocation ratios' do + should contain_class('nova').with( + :cpu_allocation_ratio => Noop.puppet_function('pick', nova_hash['cpu_allocation_ratio'], '8.0'), + :disk_allocation_ratio => Noop.puppet_function('pick', nova_hash['disk_allocation_ratio'], '1.0'), + :ram_allocation_ratio => Noop.puppet_function('pick', nova_hash['ram_allocation_ratio'], '1.0'), + ) + end + it 'should configure nova::api' do # FIXME(aschultz): check rate limits should contain_class('nova::api').with(