Add a "type" field to OSD devices. When the value is "directory", the directory (specified by the "device" field) is automatically created and activated, as udev will not pick it up automatically.
This commit is contained in:
parent
84bc110cf6
commit
af3d23acc4
@ -114,8 +114,17 @@ else
|
||||
if osd_device["encrypted"] == true
|
||||
dmcrypt = "--dmcrypt"
|
||||
end
|
||||
create_cmd = "ceph-disk-prepare #{dmcrypt} #{osd_device['device']} #{osd_device['journal']}"
|
||||
if osd_device["type"] == "directory"
|
||||
directory osd_device["device"] do
|
||||
owner "root"
|
||||
group "root"
|
||||
recursive true
|
||||
end
|
||||
create_cmd << " && ceph-disk-activate #{osd_device['device']}"
|
||||
end
|
||||
execute "Creating Ceph OSD on #{osd_device['device']}" do
|
||||
command "ceph-disk-prepare #{dmcrypt} #{osd_device['device']} #{osd_device['journal']}"
|
||||
command create_cmd
|
||||
action :run
|
||||
notifies :create, "ruby_block[save osd_device status]"
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user