From: Yehuda Sadeh Date: Tue, 8 Jan 2019 03:04:25 +0000 (-0800) Subject: qa/ragweed: change the way we determine which ragweed branch to use X-Git-Tag: v14.1.0~314^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=83f7af473bd3f6cfde060bf982950f9c9799eb95;p=ceph.git qa/ragweed: change the way we determine which ragweed branch to use - 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 --- diff --git a/qa/suites/rgw/multifs/tasks/rgw_ragweed.yaml b/qa/suites/rgw/multifs/tasks/rgw_ragweed.yaml index 3114b3a46e3..a6ecc649a13 100644 --- a/qa/suites/rgw/multifs/tasks/rgw_ragweed.yaml +++ b/qa/suites/rgw/multifs/tasks/rgw_ragweed.yaml @@ -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: diff --git a/qa/suites/rgw/verify/tasks/ragweed.yaml b/qa/suites/rgw/verify/tasks/ragweed.yaml index db6b23ac982..8fbd3cefb92 100644 --- a/qa/suites/rgw/verify/tasks/ragweed.yaml +++ b/qa/suites/rgw/verify/tasks/ragweed.yaml @@ -1,6 +1,6 @@ tasks: - ragweed: client.0: - force-branch: ceph-master + default-branch: ceph-master rgw_server: client.0 stages: prepare,check diff --git a/qa/suites/upgrade/luminous-x/parallel/2-workload/rgw_ragweed_prepare.yaml b/qa/suites/upgrade/luminous-x/parallel/2-workload/rgw_ragweed_prepare.yaml index b7a7739b4ba..ab68649008b 100644 --- a/qa/suites/upgrade/luminous-x/parallel/2-workload/rgw_ragweed_prepare.yaml +++ b/qa/suites/upgrade/luminous-x/parallel/2-workload/rgw_ragweed_prepare.yaml @@ -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" diff --git a/qa/suites/upgrade/luminous-x/parallel/4-final-workload/rgw_ragweed_check.yaml b/qa/suites/upgrade/luminous-x/parallel/4-final-workload/rgw_ragweed_check.yaml index 72233b2edf6..7f31cacca68 100644 --- a/qa/suites/upgrade/luminous-x/parallel/4-final-workload/rgw_ragweed_check.yaml +++ b/qa/suites/upgrade/luminous-x/parallel/4-final-workload/rgw_ragweed_check.yaml @@ -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" diff --git a/qa/suites/upgrade/mimic-x/parallel/2-workload/rgw_ragweed_prepare.yaml b/qa/suites/upgrade/mimic-x/parallel/2-workload/rgw_ragweed_prepare.yaml index b7a7739b4ba..ab68649008b 100644 --- a/qa/suites/upgrade/mimic-x/parallel/2-workload/rgw_ragweed_prepare.yaml +++ b/qa/suites/upgrade/mimic-x/parallel/2-workload/rgw_ragweed_prepare.yaml @@ -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" diff --git a/qa/suites/upgrade/mimic-x/parallel/5-final-workload/rgw_ragweed_check.yaml b/qa/suites/upgrade/mimic-x/parallel/5-final-workload/rgw_ragweed_check.yaml index 72233b2edf6..7f31cacca68 100644 --- a/qa/suites/upgrade/mimic-x/parallel/5-final-workload/rgw_ragweed_check.yaml +++ b/qa/suites/upgrade/mimic-x/parallel/5-final-workload/rgw_ragweed_check.yaml @@ -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" diff --git a/qa/tasks/ragweed.py b/qa/tasks/ragweed.py index ef99098907c..a68c71500ed 100644 --- a/qa/tasks/ragweed.py +++ b/qa/tasks/ragweed.py @@ -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=[