From 748154a16f1f8c578e74f82afb3b6d7fa23910e7 Mon Sep 17 00:00:00 2001 From: tpaszkowski Date: Mon, 18 Mar 2013 10:47:43 -0400 Subject: [PATCH] Fix for nova-compute service not beeing started. nova-compute service should be started after nova::compute recipe will finish its work. Change-Id: I9dac760c901d04e465a20ced363242fab0b93a03 --- recipes/compute.rb | 2 +- spec/compute-redhat_spec.rb | 4 ++++ spec/compute_spec.rb | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/recipes/compute.rb b/recipes/compute.rb index 507ac1ab..f15d5a95 100644 --- a/recipes/compute.rb +++ b/recipes/compute.rb @@ -59,7 +59,7 @@ service "nova-compute" do supports :status => true, :restart => true subscribes :restart, resources("template[/etc/nova/nova.conf]") - action :enable + action [:enable, :start] end include_recipe "openstack-compute::libvirt" diff --git a/spec/compute-redhat_spec.rb b/spec/compute-redhat_spec.rb index 855946f5..0fa68461 100644 --- a/spec/compute-redhat_spec.rb +++ b/spec/compute-redhat_spec.rb @@ -32,5 +32,9 @@ describe "openstack-compute::compute" do expected = "openstack-nova-compute" expect(@chef_run).to set_service_to_start_on_boot expected end + + it "starts nova compute" do + expect(@chef_run).to start_service "openstack-nova-compute" + end end end diff --git a/spec/compute_spec.rb b/spec/compute_spec.rb index f9e6f2b2..bce033f5 100644 --- a/spec/compute_spec.rb +++ b/spec/compute_spec.rb @@ -60,6 +60,10 @@ describe "openstack-compute::compute" do expect(@chef_run).to set_service_to_start_on_boot "nova-compute" end + 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