From a033dc818f517d14a054334cfc23f440956fd36b Mon Sep 17 00:00:00 2001 From: Guilhem Lettron Date: Thu, 6 Feb 2014 13:58:49 +0100 Subject: [PATCH] Fix #74 use @grahamc code https://github.com/ceph/ceph-cookbooks/pull/74 --- recipes/osd.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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