From: Guilhem Lettron Date: Thu, 6 Feb 2014 12:58:49 +0000 (+0100) Subject: Fix #74 X-Git-Tag: v0.2.0~7^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a033dc818f517d14a054334cfc23f440956fd36b;p=ceph-cookbooks.git Fix #74 use @grahamc code https://github.com/ceph/ceph-cookbooks/pull/74 --- diff --git a/recipes/osd.rb b/recipes/osd.rb index 203ceea..7edaf55 100644 --- a/recipes/osd.rb +++ b/recipes/osd.rb @@ -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