Why The Schedule Jobs Do Not Start When There are More Than 10 Jobs Scheduled Or Job Templates Have Job Slices Configured in Ansible Tower?

Solution Verified - Updated -

Environment

Ansible Tower
AAP 2.x

Issue

When there are large number jobs scheduled for same job templates at same time or if the number of job slices configured is more that 10, then only 10 of them starts while other do not start at all.

Resolution

On Tower
- Login to Ansible Tower using admin credentials
- Access the below API endpoint

> https://<tower-url>/api/v2/settings/all 

Here, "tower_url" is the IP/HostName of your Tower server.

  • Scroll down to the input pane at the bottom
  • Find and edit the value of "SCHEDULE_MAX_JOBS"
"SCHEDULE_MAX_JOBS": x
  • The default is "SCHEDULE_MAX_JOBS": 10
  • Click on PATCH for the change to take effect.

Note: Set the value of x accordingly considering the number of scheduled job you have at one given point.

On AAP2.x Controller

AAP2.X Controller UI -> Settings -> Jobs -> edit -> Maximum Scheduled Jobs (Change this number) -> Save

Root Cause

  • SCHEDULE_MAX_JOBS is Maximum number of the same job template that can be waiting to run when launching from a schedule before no more are created.

  • By default, its value is set to 10 in Ansible Tower/Controller.

  • So, this is an expected behavior as only 10 scheduled jobs can be launched at any given point of time.

Diagnostic Steps

If we have more Than 10 Scheduled Jobs at the same time, or if the number of job slices configured is more that 10. Then only 10 of them will start & other will not start at all.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments