]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
only wait for a quorum to form on first run
authorGreg Farnum <greg@inktank.com>
Tue, 28 Aug 2012 20:28:25 +0000 (13:28 -0700)
committerGreg Farnum <greg@inktank.com>
Tue, 28 Aug 2012 20:29:12 +0000 (13:29 -0700)
recipes/mon.rb

index 5f262a6321fafac93a1fd76e6f7aca7b38bde643..ba5e24bd34249dc8bc6076a623b9d90c2bc012b9 100644 (file)
@@ -52,9 +52,11 @@ ruby_block "tell ceph-mon about its peers" do
   end
 end
 
+have_key = ::File.exists?('/etc/ceph/ceph.client.admin.keyring')
+
 ruby_block "wait until quorum is formed" do
   block do
-    if not have_quorum? then
+    if not have_key and not have_quorum? then # so, our first run and we have no quorum
       #sleep
       sleep(1)
     end
@@ -63,7 +65,7 @@ end
 
 ruby_block "create client.admin keyring" do
   block do
-    if not ::File.exists?('/etc/ceph/ceph.client.admin.keyring') then
+    if not have_key then
       if not have_quorum? then
         puts 'ceph-mon is not in quorum, skipping bootstrap-osd key generation for this run'
       else