]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
Manage starting mon with upstart
authorGuilhem Lettron <guilhem@lettron.fr>
Tue, 23 Apr 2013 08:31:01 +0000 (10:31 +0200)
committerGuilhem Lettron <guilhem@lettron.fr>
Thu, 2 May 2013 09:09:00 +0000 (11:09 +0200)
recipes/mon.rb

index 116eb418569632c926943a025b96e43ef0d61de1..3fb407edfcd10038cc8454b19ea53900537498ab 100644 (file)
@@ -59,14 +59,25 @@ unless File.exists?("/var/lib/ceph/mon/ceph-#{node["hostname"]}/done")
   end
 end
 
+if service_type == "upstart"
+  service "ceph-mon" do
+    provider Chef::Provider::Service::Upstart
+    action :enable
+  end
+  service "ceph-mon-all" do
+    provider Chef::Provider::Service::Upstart
+    supports :status => true
+    action [ :enable, :start ]
+  end
+end
+
 service "ceph_mon" do
   case service_type
   when "upstart"
-    service_name "ceph-mon-all"
+    service_name "ceph-mon-all-starter"
     provider Chef::Provider::Service::Upstart
-  when "sysvinit"
+  else
     service_name "ceph"
-    provider Chef::Provider::Service::Init
   end
   supports :restart => true, :status => true
   action [ :enable, :start ]