]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/ragweed: change the way we determine which ragweed branch to use
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 8 Jan 2019 03:04:25 +0000 (19:04 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 9 Jan 2019 19:02:57 +0000 (11:02 -0800)
 - if force-branch, use that
 - otherwise:
    - read default-branch from client config
    - use suite branch or ceph branch if suite branch is not defined
    - if this branch is one of official releases (or master), prefix
      it with 'ceph-'

try to clone branch specified above, if failed (branch doesn't exist probably)
and not force-branch, use default-branch.
Also add an option to override ragweed repo.

Switched all force-branch from ragweed qa suite to default-branch.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
qa/suites/rgw/multifs/tasks/rgw_ragweed.yaml
qa/suites/rgw/verify/tasks/ragweed.yaml
qa/suites/upgrade/luminous-x/parallel/2-workload/rgw_ragweed_prepare.yaml
qa/suites/upgrade/luminous-x/parallel/4-final-workload/rgw_ragweed_check.yaml
qa/suites/upgrade/mimic-x/parallel/2-workload/rgw_ragweed_prepare.yaml
qa/suites/upgrade/mimic-x/parallel/5-final-workload/rgw_ragweed_check.yaml
qa/tasks/ragweed.py

index 3114b3a46e34cf642bfe04cedfe493736e03a88d..a6ecc649a13bdbdc68966bfb175d5a7f58bde14b 100644 (file)
@@ -4,12 +4,12 @@ tasks:
 - rgw: [client.0]
 - ragweed:
     client.0:
-      force-branch: ceph-master
+      default-branch: ceph-master
       rgw_server: client.0
       stages: prepare
 - ragweed:
     client.0:
-      force-branch: ceph-master
+      default-branch: ceph-master
       rgw_server: client.0
       stages: check
 overrides:
index db6b23ac9828fb8597bf807d8967d47419196793..8fbd3cefb928d03ed3f354fdf15e55f44837e60a 100644 (file)
@@ -1,6 +1,6 @@
 tasks:
 - ragweed:
     client.0:
-      force-branch: ceph-master
+      default-branch: ceph-master
       rgw_server: client.0
       stages: prepare,check
index b7a7739b4ba43568a1d73e9a267b3e34e3733b13..ab68649008bf87652e0eba3f20663c7d1a0f37f4 100644 (file)
@@ -8,7 +8,7 @@ workload:
       - client.1
     - ragweed:
         client.1:
-          force-branch: ceph-master
+          default-branch: ceph-master
           rgw_server: client.1
           stages: prepare
     - print: "**** done rgw ragweed prepare 2-workload"
index 72233b2edf6f8160f787360171b72bfe9a4054f0..7f31cacca6857b4e683bc4ecea7664cf36db5f60 100644 (file)
@@ -5,7 +5,7 @@ rgw-final-workload:
   full_sequential:
   - ragweed:
       client.1:
-        force-branch: ceph-master
+        default-branch: ceph-master
         rgw_server: client.1
         stages: check
   - print: "**** done ragweed check 4-final-workload"
index b7a7739b4ba43568a1d73e9a267b3e34e3733b13..ab68649008bf87652e0eba3f20663c7d1a0f37f4 100644 (file)
@@ -8,7 +8,7 @@ workload:
       - client.1
     - ragweed:
         client.1:
-          force-branch: ceph-master
+          default-branch: ceph-master
           rgw_server: client.1
           stages: prepare
     - print: "**** done rgw ragweed prepare 2-workload"
index 72233b2edf6f8160f787360171b72bfe9a4054f0..7f31cacca6857b4e683bc4ecea7664cf36db5f60 100644 (file)
@@ -5,7 +5,7 @@ rgw-final-workload:
   full_sequential:
   - ragweed:
       client.1:
-        force-branch: ceph-master
+        default-branch: ceph-master
         rgw_server: client.1
         stages: check
   - print: "**** done ragweed check 4-final-workload"
index ef99098907c941456c15dbc22795c8286d1a8676..a68c71500edcd3673ec60c33d9968d4ccb59e62c 100644 (file)
@@ -32,30 +32,46 @@ def download(ctx, config):
     assert isinstance(config, dict)
     log.info('Downloading ragweed...')
     testdir = teuthology.get_testdir(ctx)
-    s3_branches = [ 'giant', 'firefly', 'firefly-original', 'hammer' ]
+    s3_branches = [ 'master', 'nautilus', 'mimic', 'luminous', 'kraken', 'jewel' ]
     for (client, cconf) in config.items():
+        default_branch = ''
         branch = cconf.get('force-branch', None)
         if not branch:
+            default_branch = cconf.get('default-branch', None)
             ceph_branch = ctx.config.get('branch')
             suite_branch = ctx.config.get('suite_branch', ceph_branch)
+            ragweed_repo = ctx.config.get('ragweed_repo', teuth_config.ceph_git_base_url + 'ragweed.git')
             if suite_branch in s3_branches:
-                branch = cconf.get('branch', suite_branch)
-           else:
                 branch = cconf.get('branch', 'ceph-' + suite_branch)
+           else:
+                branch = cconf.get('branch', suite_branch)
         if not branch:
             raise ValueError(
                 "Could not determine what branch to use for ragweed!")
         else:
             log.info("Using branch '%s' for ragweed", branch)
         sha1 = cconf.get('sha1')
-        ctx.cluster.only(client).run(
-            args=[
-                'git', 'clone',
-                '-b', branch,
-                teuth_config.ceph_git_base_url + 'ragweed.git',
-                '{tdir}/ragweed'.format(tdir=testdir),
-                ],
-            )
+        try:
+            ctx.cluster.only(client).run(
+                args=[
+                    'git', 'clone',
+                    '-b', branch,
+                    ragweed_repo,
+                    '{tdir}/ragweed'.format(tdir=testdir),
+                    ],
+                )
+        except Exception as e:
+            if not default_branch:
+                raise e
+            ctx.cluster.only(client).run(
+                args=[
+                    'git', 'clone',
+                    '-b', default_branch,
+                    ragweed_repo,
+                    '{tdir}/ragweed'.format(tdir=testdir),
+                    ],
+                )
+
         if sha1 is not None:
             ctx.cluster.only(client).run(
                 args=[