From: Greg Farnum Date: Tue, 28 Aug 2012 22:41:54 +0000 (-0700) Subject: osd: be more generous about accepting monitors. X-Git-Tag: rebased~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7a2b8ab8922c5ca20de84b0f2ea830b5a970faae;p=ceph-cookbooks.git osd: be more generous about accepting monitors. The solr database doesn't update quickly enough for our search to work well on initial bringup. Instead, fail if we actually have no monitors, but otherwise loop until our search for a mon with the osd bootstrap key succeeds. --- diff --git a/recipes/bootstrap_osd.rb b/recipes/bootstrap_osd.rb index ec1e3e3..27e74d9 100644 --- a/recipes/bootstrap_osd.rb +++ b/recipes/bootstrap_osd.rb @@ -7,12 +7,19 @@ package 'gdisk' do action :upgrade end -mons = get_mon_nodes("ceph_bootstrap_osd_key:*") +mons = get_mon_nodes() +have_mons = !mons.empty? +mons = get_mon_nodes("ceph_bootstrap_osd_key") -if mons.empty? then +if not have_mons then puts "No ceph-mon found." else + while mons.empty? + sleep(1) + mons = get_mon_nodes("ceph_bootstrap_osd_key") + end # while mons.empty? + directory "/var/lib/ceph/bootstrap-osd" do owner "root" group "root"