From f48b3732a286b322e07a3f32a31cc8565436412e Mon Sep 17 00:00:00 2001 From: Alexandre Marangone Date: Mon, 6 May 2013 17:06:31 -0700 Subject: [PATCH] OSD: service start fixes - fix upstart job name typo - start all OSD at the end of the recipe Signed-off-by: Alexandre Marangone --- recipes/osd.rb | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/recipes/osd.rb b/recipes/osd.rb index eb70b1c..13aec92 100644 --- a/recipes/osd.rb +++ b/recipes/osd.rb @@ -45,19 +45,6 @@ if !search(:node,"hostname:#{node['hostname']} AND dmcrypt:true").empty? end service_type = node["ceph"]["osd"]["init_style"] -service "ceph_osd" do - case service_type - when "sysvinit" - service_name "ceph" - provider Chef::Provider::Service::Init - when "upstart" - service_name "ceph-osd-all" - provider Chef::Provider::Service::Upstart - action :enable - end - supports :restart => true -end - mons = get_mon_nodes("ceph_bootstrap_osd_key:*") if mons.empty? then @@ -129,7 +116,6 @@ else execute "Creating Ceph OSD on #{osd_device['device']}" do command "ceph-disk-prepare #{dmcrypt} #{osd_device['device']}" action :run - notifies :start, "service[ceph_osd]", :immediately end # we add this status to the node env # so that we can implement recreate @@ -138,6 +124,17 @@ else node.normal["ceph"]["osd_devices"][index]["status"] = "deployed" node.save end + service "ceph_osd" do + case service_type + when "upstart" + service_name "ceph-osd-all-starter" + provider Chef::Provider::Service::Upstart + else + service_name "ceph" + end + action [ :enable, :start ] + supports :restart => true + end else Log.info('node["ceph"]["osd_devices"] empty') end -- 2.47.3