]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
Fix status adjustment for "deployed" devices. 68/head
authorAndy McCrae <andy.mccrae@googlemail.com>
Thu, 26 Sep 2013 14:37:03 +0000 (15:37 +0100)
committerAndy McCrae <andy.mccrae@googlemail.com>
Thu, 26 Sep 2013 14:37:03 +0000 (15:37 +0100)
Because of how chef resource cloning works, when multiple devices are
setup, only the last device is actually set to "deployed" meaning
subsequent chef-client runs fail. This fix will ensure the resource isn't
cloned so each device is marked as "deployed" appropriately.

recipes/osd.rb

index e3b56b4c69b0a5a4a7526bc669765b8d32d08200..6bd84127ab6d5d8104dc80ccffcc5a9febb54752 100644 (file)
@@ -133,13 +133,13 @@ else
         execute "Creating Ceph OSD on #{osd_device['device']}" do
           command create_cmd
           action :run
-          notifies :create, "ruby_block[save osd_device status]"
+          notifies :create, "ruby_block[save osd_device status #{index}]"
         end
         # we add this status to the node env
         # so that we can implement recreate
         # and/or delete functionalities in the
         # future.
-        ruby_block "save osd_device status" do
+        ruby_block "save osd_device status #{index}" do
           block do
             node.normal["ceph"]["osd_devices"][index]["status"] = "deployed"
             node.save