Skip to content

Commit

Permalink
Merge pull request #1831 from kamoltat/wip-ksirivad-rerun-readme
Browse files Browse the repository at this point in the history
teuthology-suite: --seed & --subset now also stored in teuthology.log, config.yaml and orig.config.yaml
Reviewed-by: Zack Cerza <[email protected]>
  • Loading branch information
kamoltat authored Apr 5, 2023
2 parents d7c4062 + 0832e85 commit 8d156ae
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
24 changes: 14 additions & 10 deletions scripts/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@
contain each facet at least once) and schedule
piece <index>. Scheduling 0/<outof>, 1/<outof>,
2/<outof> ... <outof>-1/<outof> 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>, --priority <priority>
Job priority (lower is sooner)
[default: 1000]
Expand Down Expand Up @@ -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 <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 <threshold> Do not allow to schedule the run if the number
of jobs exceeds <threshold>. 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 |
Expand Down
4 changes: 4 additions & 0 deletions teuthology/suite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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


Expand Down
3 changes: 3 additions & 0 deletions teuthology/suite/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8d156ae

Please sign in to comment.