diff --git a/recipes/osd.rb b/recipes/osd.rb index fc2f9c6..42cf5c7 100644 --- a/recipes/osd.rb +++ b/recipes/osd.rb @@ -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'] @@ -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