Browse Source

Fix nova deprecated parameters

Upstream patch https://review.openstack.org/447533 removes
deprecated parameters from puppet-nova, so we need update
them in fuel-library

Change-Id: I1c5c2d86e5ac100c2635cae8ee3506d8719d56f9
Closes-Bug: #1674375
Mykyta Karpin 2 years ago
parent
commit
c25dbe9248

+ 5
- 3
deployment/puppet/openstack_tasks/manifests/ironic/ironic_compute.pp View File

@@ -112,6 +112,11 @@ class openstack_tasks::ironic::ironic_compute {
112 112
     os_region_name         => $region_name,
113 113
   }
114 114
 
115
+  class { '::nova::availability_zone':
116
+    default_availability_zone => $nova_hash['default_availability_zone'],
117
+    default_schedule_zone     => $nova_hash['default_schedule_zone'],
118
+  }
119
+
115 120
   class { '::nova::compute':
116 121
     ensure_package            => installed,
117 122
     enabled                   => false,
@@ -119,10 +124,7 @@ class openstack_tasks::ironic::ironic_compute {
119 124
     force_config_drive        => $nova_hash['force_config_drive'],
120 125
     #NOTE(bogdando) default became true in 4.0.0 puppet-nova (was false)
121 126
     neutron_enabled           => true,
122
-    default_availability_zone => $nova_hash['default_availability_zone'],
123
-    default_schedule_zone     => $nova_hash['default_schedule_zone'],
124 127
     reserved_host_memory      => '0',
125
-    compute_manager           => 'ironic.nova.compute.manager.ClusteredComputeManager',
126 128
     allow_resize_to_same_host => pick($nova_hash['allow_resize_to_same_host'], true)
127 129
   }
128 130
 

+ 10
- 1
tests/noop/spec/hosts/ironic/ironic-compute_spec.rb View File

@@ -64,7 +64,6 @@ describe manifest do
64 64
         should contain_nova_config('ironic/project_name').with(:value => ironic_tenant)
65 65
         should contain_nova_config('ironic/auth_url').with(:value => "#{admin_uri}/v2.0")
66 66
         should contain_nova_config('DEFAULT/compute_driver').with(:value => 'ironic.IronicDriver')
67
-        should contain_nova_config('DEFAULT/compute_manager').with(:value => 'ironic.nova.compute.manager.ClusteredComputeManager')
68 67
         should contain_nova_config('neutron/auth_url').with(:value => "#{admin_uri}/v3")
69 68
         should contain_nova_config('DEFAULT/max_concurrent_builds').with(:value => '50')
70 69
 
@@ -151,6 +150,16 @@ describe manifest do
151 150
           :allow_resize_to_same_host => Noop.puppet_function('pick', nova_hash['allow_resize_to_same_host'], true)
152 151
         )
153 152
       end
153
+
154
+      let(:default_availability_zone) { Noop.puppet_function 'pick', nova_hash['default_availability_zone'], facts[:os_service_default] }
155
+      let(:default_schedule_zone) { Noop.puppet_function 'pick', nova_hash['default_schedule_zone'], facts[:os_service_default] }
156
+
157
+      it 'should configure availability zones' do
158
+        should contain_class('nova::availability_zone').with(
159
+          'default_availability_zone' => default_availability_zone,
160
+          'default_schedule_zone'     => default_schedule_zone,
161
+        )
162
+      end
154 163
     end
155 164
   end
156 165
 

Loading…
Cancel
Save