From 91d07e9e031f8969e70e0536c1fe6018708d4b63 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Sun, 10 May 2020 16:36:46 +0200 Subject: [PATCH] suite: schedule first and last in suite jobs once Only schedule --first-in-suite and --last-in-suite jobs once per run when --num is provided for a suite. Fixes: https://tracker.ceph.com/issues/45520 Signed-off-by: Kyr Shatskyy --- teuthology/suite/run.py | 2 +- teuthology/suite/test/test_run_.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/teuthology/suite/run.py b/teuthology/suite/run.py index 249d289b2..5d2861a91 100644 --- a/teuthology/suite/run.py +++ b/teuthology/suite/run.py @@ -294,7 +294,6 @@ class Run(object): def build_base_args(self): base_args = [ '--name', self.name, - '--num', str(self.args.num), '--worker', util.get_worker(self.args.machine_type), ] if self.args.dry_run: @@ -411,6 +410,7 @@ class Run(object): arg = copy.deepcopy(self.base_args) arg.extend([ + '--num', str(self.args.num), '--description', description, '--', ]) diff --git a/teuthology/suite/test/test_run_.py b/teuthology/suite/test/test_run_.py index 503b25b37..5b44761f8 100644 --- a/teuthology/suite/test/test_run_.py +++ b/teuthology/suite/test/test_run_.py @@ -250,6 +250,7 @@ class TestScheduleSuite(object): # schedule_jobs() is just neutered; check calls below self.args.newest = 0 + self.args.num = 42 runobj = self.klass(self.args) runobj.base_args = list() count = runobj.schedule_suite() @@ -263,6 +264,8 @@ class TestScheduleSuite(object): yaml=yaml.safe_load('\n'.join(frags)), sha1='ceph_sha1', args=[ + '--num', + '42', '--description', os.path.join(self.args.suite, build_matrix_desc), '--', -- 2.47.3