Browse Source

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
Alex Schultz 2 years ago
parent
commit
b9d23caf89

+ 3
- 3
deployment/puppet/openstack_tasks/manifests/openstack_controller/openstack_controller.pp View File

@@ -188,6 +188,9 @@ class openstack_tasks::openstack_controller::openstack_controller {
188 188
     rabbit_heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
189 189
     rabbit_heartbeat_rate              => $rabbit_heartbeat_rate,
190 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 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 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 389
     scheduler_host_subset_size => pick($nova_hash['scheduler_host_subset_size'], '30'),
390 390
     scheduler_default_filters  => $nova_scheduler_filters,
391 391
     scheduler_host_manager     => $scheduler_host_manager,

+ 8
- 0
tests/noop/spec/hosts/openstack-controller/openstack-controller_spec.rb View File

@@ -260,6 +260,14 @@ describe manifest do
260 260
       should contain_nova_config('keystone_authtoken/memcached_servers').with(:value => local_memcached_server)
261 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 271
     it 'should configure nova::api' do
264 272
       # FIXME(aschultz): check rate limits
265 273
       should contain_class('nova::api').with(

Loading…
Cancel
Save