commit
a28b15eab7
@ -45,19 +45,6 @@ if !search(:node,"hostname:#{node['hostname']} AND dmcrypt:true").empty?
|
|||||||
end
|
end
|
||||||
|
|
||||||
service_type = node["ceph"]["osd"]["init_style"]
|
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:*")
|
mons = get_mon_nodes("ceph_bootstrap_osd_key:*")
|
||||||
|
|
||||||
if mons.empty? then
|
if mons.empty? then
|
||||||
@ -129,7 +116,6 @@ else
|
|||||||
execute "Creating Ceph OSD on #{osd_device['device']}" do
|
execute "Creating Ceph OSD on #{osd_device['device']}" do
|
||||||
command "ceph-disk-prepare #{dmcrypt} #{osd_device['device']}"
|
command "ceph-disk-prepare #{dmcrypt} #{osd_device['device']}"
|
||||||
action :run
|
action :run
|
||||||
notifies :start, "service[ceph_osd]", :immediately
|
|
||||||
end
|
end
|
||||||
# we add this status to the node env
|
# we add this status to the node env
|
||||||
# so that we can implement recreate
|
# so that we can implement recreate
|
||||||
@ -138,6 +124,17 @@ else
|
|||||||
node.normal["ceph"]["osd_devices"][index]["status"] = "deployed"
|
node.normal["ceph"]["osd_devices"][index]["status"] = "deployed"
|
||||||
node.save
|
node.save
|
||||||
end
|
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
|
else
|
||||||
Log.info('node["ceph"]["osd_devices"] empty')
|
Log.info('node["ceph"]["osd_devices"] empty')
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user