]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
library: fix indentation on have_quorum
authorGreg Farnum <greg@inktank.com>
Thu, 9 Aug 2012 01:06:44 +0000 (18:06 -0700)
committerGreg Farnum <greg@inktank.com>
Tue, 4 Sep 2012 21:59:08 +0000 (14:59 -0700)
libraries/default.rb

index 68c6852fa8bd3b7e2198b440b8d0e3b98a784c71..351248e0726af71e0e8fd6346729dab99fb39ab0 100644 (file)
@@ -45,17 +45,17 @@ end
 QUORUM_STATES = ['leader', 'peon']
 
 def have_quorum?()
-    # "ceph auth get-or-create-key" would hang if the monitor wasn't
-    # in quorum yet, which is highly likely on the first run. This
-    # helper lets us delay the key generation into the next
-    # chef-client run, instead of hanging.
-    #
-    # Also, as the UNIX domain socket connection has no timeout logic
-    # in the ceph tool, this exits immediately if the ceph-mon is not
-    # running for any reason; trying to connect via TCP/IP would wait
-    # for a relatively long timeout.
-    mon_status = %x[ceph --admin-daemon /var/run/ceph/ceph-mon.#{node['hostname']}.asok mon_status]
-    raise 'getting monitor state failed' unless $?.exitstatus == 0
-    state = JSON.parse(mon_status)['state']
-    return QUORUM_STATES.include?(state)
+  # "ceph auth get-or-create-key" would hang if the monitor wasn't
+  # in quorum yet, which is highly likely on the first run. This
+  # helper lets us delay the key generation into the next
+  # chef-client run, instead of hanging.
+  #
+  # Also, as the UNIX domain socket connection has no timeout logic
+  # in the ceph tool, this exits immediately if the ceph-mon is not
+  # running for any reason; trying to connect via TCP/IP would wait
+  # for a relatively long timeout.
+  mon_status = %x[ceph --admin-daemon /var/run/ceph/ceph-mon.#{node['hostname']}.asok mon_status]
+  raise 'getting monitor state failed' unless $?.exitstatus == 0
+  state = JSON.parse(mon_status)['state']
+  return QUORUM_STATES.include?(state)
 end