Hi,
I have been trying to run concurrent jobs in AWX but is currently faced with an issue where if you have “update on launch” set on inventory script, the second and further jobs would be in pending state and would wait for the first job to complete. Inventory is supplied via custom python script which needs to run for each job and hence not static.
I was wondering if there is any we could solve this? Could we supply inventory data as params when invoking api (api/v2/job_templates/{id}/launch/), well not really, but looking for a solution to parallelize/concurrent the jobs as hosts data is coming to me in a phased manner. I have an intermediate code/cron job to batch the hosts and invoke awx API after a certain timeout.
Open to ideas.
Thanks
TKS
Hi TKS,
Did you enable concurrent jobs checkbox in the job template? If you queue up 10 jobs all based on the same inventory, they all enter pending at the same time. The task manager will start an inventory update (since your update on launch is set to True). All 10 pending jobs will wait on that inventory update to finish running. Then, if concurrent is enabled for your JT, then all 10 will enter a running state.
I may be missing a detail, but that is the intended behavior.
AWX Team
Yes, the concurrent checkbox is enabled.
This is a bit old service:
Awx version:7.0.0
Ansible version: 2.8.4
Is the mentioned behaviour applicable for this version of awx? Does cache timeout value have any impact?
the behavior I described is for later versions of AWX. I’m not sure what the expectation is for v7.0 is, as that version is no longer supported.
We highly recommend upgrading to the latest version of AWX if possible. I suspect you won’t have this issue on new versions.
AWX Team
Is there a way we can pass in the inventory file for the jobs via API call?