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
This commit is contained in:
Alex Schultz 2017-03-17 16:21:12 -06:00
parent ccdcbae82a
commit b9d23caf89
2 changed files with 11 additions and 3 deletions

View File

@ -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,

View File

@ -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(