]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
Fix #74
authorGuilhem Lettron <guilhem.lettron@optiflows.com>
Thu, 6 Feb 2014 12:58:49 +0000 (13:58 +0100)
committerGuilhem Lettron <guilhem.lettron@optiflows.com>
Thu, 6 Feb 2014 13:04:04 +0000 (14:04 +0100)
use @grahamc code https://github.com/ceph/ceph-cookbooks/pull/74

recipes/osd.rb

index 203ceeaa3fb228c7b50d236f68afcd871052ace1..7edaf552a4d27ab9570bc7afaaf41a73947da23d 100644 (file)
@@ -100,7 +100,11 @@ else
   #  - $cluster should always be ceph
   #  - The --dmcrypt option will be available starting w/ Cuttlefish
   if !node["ceph"]["osd_devices"].nil?
-    node["ceph"]["osd_devices"].each_with_index do |osd_device, index|
+    devices = node["ceph"]["osd_devices"]
+
+    devices = Hash[(0...devices.size).zip devices] unless devices.kind_of? Hash
+
+    devices.each do |osd_device, index|
       unless osd_device["status"].nil?
         Log.info("osd: osd_device #{osd_device} has already been setup.")
         next