Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added zap_disk option #173

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion recipes/osd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
# osd/$cluster-$id)
# - $cluster should always be ceph
# - The --dmcrypt option will be available starting w/ Cuttlefish
# - Set zap_disk to true to zap OSD disks before activation
if node['ceph']['osd_devices']
devices = node['ceph']['osd_devices']

Expand All @@ -110,9 +111,10 @@
end

dmcrypt = osd_device['encrypted'] == true ? '--dmcrypt' : ''
zap_disk = (osd_device['status'].eq? 'zap-disk') ? '--zap-disk' : ''

execute "ceph-disk-prepare on #{osd_device['device']}" do
command "ceph-disk-prepare #{dmcrypt} #{osd_device['device']} #{osd_device['journal']}"
command "ceph-disk-prepare #{dmcrypt} #{zap_disk} #{osd_device['device']} #{osd_device['journal']}"
action :run
notifies :create, "ruby_block[save osd_device status #{index}]", :immediately
end
Expand Down