in the output of teuthology-suite command. -1
for a random seed [default: -1].
--force-priority Skip the priority check.
+ --disable-num-jobs-check Skip the number of jobs check. By default,
+ teuthology will not allow you to schedule more
+ than JOBS_TO_SCHEDULE_THRESHOLD=500 jobs, because
+ it is too high. Use this if you need to schedule
+ more than 500 jobs.
""".format(
default_machine_type=config.default_machine_type,
class Run(object):
WAIT_MAX_JOB_TIME = 30 * 60
WAIT_PAUSE = 5 * 60
+ JOBS_TO_SCHEDULE_THRESHOLD = 500
__slots__ = (
'args', 'name', 'base_config', 'suite_repo_path', 'base_yaml_paths',
'base_args', 'package_versions', 'kernel_dict', 'config_input',
elif priority < 150 and jobs_to_schedule > 100:
util.schedule_fail(msg)
+ def check_num_jobs(self, jobs_to_schedule):
+ msg=f'''Unable to schedule {jobs_to_schedule} jobs, too many jobs.
+
+Note: If you still want to go ahead, use --disable-num-jobs-check'''
+ if jobs_to_schedule > Run.JOBS_TO_SCHEDULE_THRESHOLD:
+ util.schedule_fail(msg)
+
def schedule_suite(self):
"""
Schedule the suite-run. Returns the number of jobs scheduled.
if self.args.priority and jobs_to_schedule and not self.args.force_priority:
self.check_priority(len(jobs_to_schedule))
+ # Before scheduling jobs, check number of jobs to avoid scheduling 1000s
+ if jobs_to_schedule and not self.args.disable_num_jobs_check:
+ self.check_num_jobs(len(jobs_to_schedule))
+
self.schedule_jobs(jobs_missing_packages, jobs_to_schedule, name)
os.remove(base_yaml_path)