diff --git a/scripts/suite.py b/scripts/suite.py index 5cafee024c..4ac7d9cac5 100644 --- a/scripts/suite.py +++ b/scripts/suite.py @@ -121,7 +121,8 @@ contain each facet at least once) and schedule piece . Scheduling 0/, 1/, 2/ ... -1/ will schedule all - jobs in the suite (many more than once). + jobs in the suite (many more than once). If specified, + this value can be found in results.log. -p , --priority Job priority (lower is sooner) [default: 1000] @@ -157,25 +158,28 @@ using the same logic as --filter. Of all the flags that were passed when scheduling the original run, the resulting one will only - inherit the suite value. Any others must be - passed as normal while scheduling with this - feature. For random tests involving facet whose - path ends with '$' operator, you might want to - use --seed argument to repeat them. + inherit the --suite value. Any other arguments + must be passed again while scheduling. By default, + 'seed' and 'subset' will be taken from results.log, + but can be overide if passed again. + This is important for tests involving random facet + (path ends with '$' operator). -R, --rerun-statuses A comma-separated list of statuses to be used with --rerun. Supported statuses are: 'dead', 'fail', 'pass', 'queued', 'running', 'waiting' [default: fail,dead] --seed SEED An random number mostly useful when used along - with --rerun argument. This number can be found - in the output of teuthology-suite command. -1 - for a random seed [default: -1]. + with --rerun argument to rerun the exact + same jobs that can only be picked at random. + This number can be found in the output of + teuthology-suite command or in results.log. + Pass -1 for a random seed [default: -1]. --force-priority Skip the priority check. --job-threshold Do not allow to schedule the run if the number of jobs exceeds . Use 0 to allow any number [default: {default_job_threshold}]. - --no-nested-subset Do not perform nested suite subsets. + --no-nested-subset Do not perform nested suite subsets [default: false]. +=================+=================================================================+ | Priority | Explanation | diff --git a/teuthology/suite/__init__.py b/teuthology/suite/__init__.py index be51e4dc3c..9bb876f2be 100644 --- a/teuthology/suite/__init__.py +++ b/teuthology/suite/__init__.py @@ -166,8 +166,11 @@ def get_rerun_conf(conf): try: subset, no_nested_subset, seed = reporter.get_rerun_conf(conf.rerun) except IOError: + log.error('Error accessing results.log, file might be missing.') + log.warning('Using default/specified values for --seed, --subset and --no-nested-subset') return conf.subset, conf.no_nested_subset, conf.seed if seed is None: + log.warning('Missing seed in results.log, using default/specified values for --seed') return conf.subset, conf.no_nested_subset, conf.seed if conf.seed < 0: log.info('Using stored seed=%s', seed) @@ -185,6 +188,7 @@ def get_rerun_conf(conf): stored_subset=subset) if conf.no_nested_subset is True: log.info('Nested subsets disabled') + no_nested_subset = conf.no_nested_subset return subset, no_nested_subset, seed diff --git a/teuthology/suite/run.py b/teuthology/suite/run.py index 5c95668b94..02803e9ebf 100644 --- a/teuthology/suite/run.py +++ b/teuthology/suite/run.py @@ -343,6 +343,9 @@ def build_base_config(self): job_config.user = self.user job_config.timestamp = self.timestamp job_config.priority = self.args.priority + job_config.seed = self.args.seed + if self.args.subset: + job_config.subset = '/'.join(str(i) for i in self.args.subset) if self.args.email: job_config.email = self.args.email if self.args.owner: