]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
teuthology-suite: Log errors & warnings if results.log is missing during --rerun
authorKamoltat <ksirivad@redhat.com>
Thu, 30 Mar 2023 17:12:17 +0000 (17:12 +0000)
committerKamoltat <ksirivad@redhat.com>
Mon, 3 Apr 2023 18:47:59 +0000 (18:47 +0000)
Notify the user if `results.log` is missing when
they issue a rerun.

Also, edited teuthology-suite doc
to inform the user about how `--rerun` by
default parse `--seed`, `--subset` and
`--no-nested-subset` from `results.log`
by default

Fixes: https://tracker.ceph.com/issues/59300
Signed-off-by: Kamoltat <ksirivad@redhat.com>
scripts/suite.py
teuthology/suite/__init__.py

index 5cafee024cbea6d2e613bc7cb42b09b81fa23f91..4ac7d9cac53d5f3bdbe97f73702c5633839399e5 100644 (file)
@@ -121,7 +121,8 @@ Scheduler arguments:
                               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]
@@ -157,25 +158,28 @@ Scheduler arguments:
                               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                                                     |
index be51e4dc3c44e4cc655003a69ec772aab855c2d1..9bb876f2be1a6305b21ff2f2b82f9a75690d3dd0 100644 (file)
@@ -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