]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
use 'mon create-initial' always
authorAlfredo Deza <alfredo.deza@inktank.com>
Thu, 21 Aug 2014 14:03:28 +0000 (10:03 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Thu, 21 Aug 2014 15:38:16 +0000 (11:38 -0400)
But don't error if it fails, as this would mean that the monitors
are just taking longer to form quorum. Go and try the next block which will
wait up to 15 minutes for a successful gatherkeys to happen (that only works
if monitors have formed quorum).

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
(cherry picked from commit 70a1f18adfdf673b983cc7f5f2c78abb899001c7)

tasks/ceph_deploy.py

index 62c8da405607ddb4e6523c7ab41ade38e613b4cf..fbfc01f69d06b4e7f301c3595b902158744354e2 100644 (file)
@@ -209,27 +209,11 @@ def build_ceph_cluster(ctx, config):
         if estatus_install != 0:
             raise RuntimeError("ceph-deploy: Failed to install ceph")
 
-        mon_no = None
-        mon_no = config.get('mon_initial_members')
-        if mon_no is not None:
-            i = 0
-            mon1 = []
-            while(i < mon_no):
-                mon1.append(mon_node[i])
-                i = i + 1
-            initial_mons = " ".join(mon1)
-            for k in range(mon_no, len(mon_node)):
-                mon_create_nodes = './ceph-deploy mon create' + " " + \
-                    initial_mons + " " + mon_node[k]
-                estatus_mon = execute_ceph_deploy(ctx, config,
-                                                  mon_create_nodes)
-                if estatus_mon != 0:
-                    raise RuntimeError("ceph-deploy: Failed to create monitor")
-        else:
-            mon_create_nodes = './ceph-deploy mon create-initial'
-            estatus_mon = execute_ceph_deploy(ctx, config, mon_create_nodes)
-            if estatus_mon != 0:
-                raise RuntimeError("ceph-deploy: Failed to create monitors")
+        mon_create_nodes = './ceph-deploy mon create-initial'
+        # If the following fails, it is OK, it might just be that the monitors
+        # are taking way more than a minute/monitor to form quorum, so lets
+        # try the next block which will wait up to 15 minutes to gatherkeys.
+        estatus_mon = execute_ceph_deploy(ctx, config, mon_create_nodes)
 
         estatus_gather = execute_ceph_deploy(ctx, config, gather_keys)
         max_gather_tries = 90