From: Greg Farnum Date: Tue, 28 Aug 2012 20:28:25 +0000 (-0700) Subject: only wait for a quorum to form on first run X-Git-Tag: eval1~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b034bb9ff6d15c9af17aadfd95fe90274b0c84d1;p=ceph-cookbooks.git only wait for a quorum to form on first run --- diff --git a/recipes/mon.rb b/recipes/mon.rb index 5f262a6..ba5e24b 100644 --- a/recipes/mon.rb +++ b/recipes/mon.rb @@ -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