]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
Fix issue with old ceph-disk-prepare 18/head
authorAlexandre Marangone <alexandre.marangone@inktank.com>
Fri, 29 Mar 2013 17:39:26 +0000 (10:39 -0700)
committerAlexandre Marangone <alexandre.marangone@inktank.com>
Fri, 29 Mar 2013 17:45:56 +0000 (10:45 -0700)
Old ceph-disk-prepare re-write the partition table and fail before writting
the Parition GUID.
This fix tests the presence of a osd_device status, if present, we skip
the OSD.
It also fix a typo when setting the osd_device status

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
recipes/osd.rb

index ce26224a70b98d4c90bae8607fdc2fcf4b1a56e1..5380868d0befbc074913d92bd4a48f34b90e0056 100644 (file)
@@ -130,6 +130,9 @@ else
     #  - $cluster should always be ceph
     #  - The --dmcrypt option will be available starting w/ Cuttlefish
     node["ceph"]["osd_devices"].each_with_index do |osd_device,index|
+      if not osd_device["status"].nil?
+        next
+      end
       dmcrypt = ""
       if osd_device["encrypted"] == true
         dmcrypt = "--dmcrypt"
@@ -143,7 +146,7 @@ else
       # so that we can implement recreate
       # and/or delete functionalities in the
       # future.
-      node.normal["ceph"]["osd_devices"][index]["status"] == "deployed"
+      node.normal["ceph"]["osd_devices"][index]["status"] = "deployed"
       node.save
     end
   end