diff --git a/CHANGELOG.md b/CHANGELOG.md index 149f8217..ad61ccbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This file is used to list changes made in each version of cookbook-openstack-com * Allow rabbit ssl in the ha case * Move deprecated neutron_*/glance_*/cinder_* configurations to [neutron]/[glance]/[cinder] sections in nova.conf * Allow dbsync_timeout to be configurable +* Make libvirtd service started prior to nova compute service ## 9.3.1 * Move auth configuration from api-paste.ini to nova.conf diff --git a/recipes/compute.rb b/recipes/compute.rb index d33afe02..5e3c2302 100644 --- a/recipes/compute.rb +++ b/recipes/compute.rb @@ -74,6 +74,8 @@ directory node['openstack']['compute']['instances_path'] do recursive true end +include_recipe 'openstack-compute::libvirt' + service 'nova-compute' do service_name platform_options['compute_compute_service'] supports status: true, restart: true @@ -81,5 +83,3 @@ service 'nova-compute' do action [:enable, :start] end - -include_recipe 'openstack-compute::libvirt' diff --git a/spec/compute_spec.rb b/spec/compute_spec.rb index f43ccf06..8f14afd8 100644 --- a/spec/compute_spec.rb +++ b/spec/compute_spec.rb @@ -90,6 +90,10 @@ describe 'openstack-compute::compute' do end end + it 'runs libvirt recipe' do + expect(chef_run).to include_recipe 'openstack-compute::libvirt' + end + it 'starts nova compute on boot' do expect(chef_run).to enable_service 'nova-compute' end @@ -97,9 +101,5 @@ describe 'openstack-compute::compute' do it 'starts nova compute' do expect(chef_run).to start_service 'nova-compute' end - - it 'runs libvirt recipe' do - expect(chef_run).to include_recipe 'openstack-compute::libvirt' - end end end