summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykyta Karpin <mkarpin@mirantis.com>2017-03-20 17:51:00 +0200
committerMykyta Karpin <mkarpin@mirantis.com>2017-03-20 17:52:57 +0200
commitc25dbe92487225e1209734ecaba2ff93aec42320 (patch)
treebe48329e2f70c07cd596002a646c1e341f57375c
parentccdcbae82a5612a349f81e9cbfb927b8f04bb9dc (diff)
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
Notes
Notes (review): Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Code-Review+1: Emilien Macchi <emilien@redhat.com> Code-Review+2: Stanislaw Bogatkin <sbogatkin@mirantis.com> Code-Review+2: Denis Egorenko <degorenko@mirantis.com> Workflow+1: Denis Egorenko <degorenko@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 21 Mar 2017 09:25:15 +0000 Reviewed-on: https://review.openstack.org/447561 Project: openstack/fuel-library Branch: refs/heads/master
-rw-r--r--deployment/puppet/openstack_tasks/manifests/ironic/ironic_compute.pp8
-rw-r--r--tests/noop/spec/hosts/ironic/ironic-compute_spec.rb11
2 files changed, 15 insertions, 4 deletions
diff --git a/deployment/puppet/openstack_tasks/manifests/ironic/ironic_compute.pp b/deployment/puppet/openstack_tasks/manifests/ironic/ironic_compute.pp
index e4e2d5e..71ad2be 100644
--- a/deployment/puppet/openstack_tasks/manifests/ironic/ironic_compute.pp
+++ b/deployment/puppet/openstack_tasks/manifests/ironic/ironic_compute.pp
@@ -112,6 +112,11 @@ class openstack_tasks::ironic::ironic_compute {
112 os_region_name => $region_name, 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 class { '::nova::compute': 120 class { '::nova::compute':
116 ensure_package => installed, 121 ensure_package => installed,
117 enabled => false, 122 enabled => false,
@@ -119,10 +124,7 @@ class openstack_tasks::ironic::ironic_compute {
119 force_config_drive => $nova_hash['force_config_drive'], 124 force_config_drive => $nova_hash['force_config_drive'],
120 #NOTE(bogdando) default became true in 4.0.0 puppet-nova (was false) 125 #NOTE(bogdando) default became true in 4.0.0 puppet-nova (was false)
121 neutron_enabled => true, 126 neutron_enabled => true,
122 default_availability_zone => $nova_hash['default_availability_zone'],
123 default_schedule_zone => $nova_hash['default_schedule_zone'],
124 reserved_host_memory => '0', 127 reserved_host_memory => '0',
125 compute_manager => 'ironic.nova.compute.manager.ClusteredComputeManager',
126 allow_resize_to_same_host => pick($nova_hash['allow_resize_to_same_host'], true) 128 allow_resize_to_same_host => pick($nova_hash['allow_resize_to_same_host'], true)
127 } 129 }
128 130
diff --git a/tests/noop/spec/hosts/ironic/ironic-compute_spec.rb b/tests/noop/spec/hosts/ironic/ironic-compute_spec.rb
index 74883f4..008cbb1 100644
--- a/tests/noop/spec/hosts/ironic/ironic-compute_spec.rb
+++ b/tests/noop/spec/hosts/ironic/ironic-compute_spec.rb
@@ -64,7 +64,6 @@ describe manifest do
64 should contain_nova_config('ironic/project_name').with(:value => ironic_tenant) 64 should contain_nova_config('ironic/project_name').with(:value => ironic_tenant)
65 should contain_nova_config('ironic/auth_url').with(:value => "#{admin_uri}/v2.0") 65 should contain_nova_config('ironic/auth_url').with(:value => "#{admin_uri}/v2.0")
66 should contain_nova_config('DEFAULT/compute_driver').with(:value => 'ironic.IronicDriver') 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 should contain_nova_config('neutron/auth_url').with(:value => "#{admin_uri}/v3") 67 should contain_nova_config('neutron/auth_url').with(:value => "#{admin_uri}/v3")
69 should contain_nova_config('DEFAULT/max_concurrent_builds').with(:value => '50') 68 should contain_nova_config('DEFAULT/max_concurrent_builds').with(:value => '50')
70 69
@@ -151,6 +150,16 @@ describe manifest do
151 :allow_resize_to_same_host => Noop.puppet_function('pick', nova_hash['allow_resize_to_same_host'], true) 150 :allow_resize_to_same_host => Noop.puppet_function('pick', nova_hash['allow_resize_to_same_host'], true)
152 ) 151 )
153 end 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 end 163 end
155 end 164 end
156 165