]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix for 'branch' overrides to work
authorVasu Kulkarni <vasu@redhat.com>
Fri, 22 Apr 2016 02:36:00 +0000 (19:36 -0700)
committerVasu Kulkarni <vasu@redhat.com>
Thu, 25 Aug 2016 00:25:58 +0000 (17:25 -0700)
teuthology default override template defines devcommit which makes
'branch' overrides in the test useless since it only picksup one option
Remove the devcommit overrides from the template and use that as
default in case no other 'branch' override exist.

Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
tasks/ceph_deploy.py

index 7f24764c880aa328ebb2e220f113e8bedc983c3c..da9f0b713f9eee0a6c6dc25ccda5dc98d3302d70 100644 (file)
@@ -186,18 +186,34 @@ def build_ceph_cluster(ctx, config):
             cbranch = config.get('branch')
             for var, val in cbranch.iteritems():
                 ceph_branch = '--{var}={val}'.format(var=var, val=val)
+        
+        ceph_sha = ctx.config['sha1']
+        devcommit = '--dev-commit={sha}'.format(sha=ceph_sha)
+        if ceph_branch:
+            option = ceph_branch
+        else:
+            option = devcommit
         all_nodes = get_all_nodes(ctx, config)
         mds_nodes = get_nodes_using_role(ctx, 'mds')
         mds_nodes = " ".join(mds_nodes)
         mon_node = get_nodes_using_role(ctx, 'mon')
         mon_nodes = " ".join(mon_node)
         new_mon = './ceph-deploy new'+" "+mon_nodes
-        install_nodes = './ceph-deploy install ' + (ceph_branch if ceph_branch else "--dev=master") + " " + all_nodes
+        install_nodes = './ceph-deploy install ' + option + " " + all_nodes
         mon_hostname = mon_nodes.split(' ')[0]
         mon_hostname = str(mon_hostname)
         gather_keys = './ceph-deploy gatherkeys'+" "+mon_hostname
         deploy_mds = './ceph-deploy mds create'+" "+mds_nodes
         no_of_osds = 0
+        estatus_install = execute_ceph_deploy(install_nodes)
+        if estatus_install != 0:
+            raise RuntimeError("ceph-deploy: Failed to install ceph")
+        # install ceph-test package too
+        install_nodes2 = './ceph-deploy install --tests ' + option + \
+                         " " + all_nodes
+        estatus_install = execute_ceph_deploy(install_nodes2)
+        if estatus_install != 0:
+            raise RuntimeError("ceph-deploy: Failed to install ceph-test")
 
         if mon_nodes is None:
             raise RuntimeError("no monitor nodes in the config file")
@@ -222,10 +238,6 @@ def build_ceph_cluster(ctx, config):
                     teuthology.append_lines_to_file(ceph_admin, conf_path, lines,
                                                     sudo=True)
 
-        estatus_install = execute_ceph_deploy(install_nodes)
-        if estatus_install != 0:
-            raise RuntimeError("ceph-deploy: Failed to install ceph")
-
         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