You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ansible to configure VMs immediately after provisioning. These VMs are provisioned on-demand and our users are waiting for them, so I need to be as quick as possible. During a typical day, as many as 15 of these VMs could be provisioning in parallel.
This works fine with vanilla ansible, but with semaphore, if I try to run the same task template multiple times in parallel, they all queue up. I found the concurrency_mode option and set it to 'node'. Docs says this should allow them to run in parallel if they are targeting different hosts, which they are, but they still queue up.
Depending on the needs of the VM, it can take anywhere from 5-30 minutes for the playbook to complete. Today we had 141 VMs created. If we restrict the playbook to running sequentially, that would take between 12 and 70 hours.
My censored config.json is below. Have I misconfigured something? Have I misunderstood node concurrency?
I think I understand why this is happening. Even though tasks are executed against a single host listed in the playbook...
---
- hosts: "{{ target_vm }}"
roles:
...
...where target_vm is passed as an extra var, they still share the same inventory. The node concurrency check seems to be checking either if the tasks share the same inventory, or if their target hosts are found in each other's inventory. In either case, this would look like a collision in my case, even though it's not.
I'll need to find some way to isolate inventories that can be automatically maintained, and isn't too convoluted.
Issue
I'm using ansible to configure VMs immediately after provisioning. These VMs are provisioned on-demand and our users are waiting for them, so I need to be as quick as possible. During a typical day, as many as 15 of these VMs could be provisioning in parallel.
This works fine with vanilla ansible, but with semaphore, if I try to run the same task template multiple times in parallel, they all queue up. I found the concurrency_mode option and set it to 'node'. Docs says this should allow them to run in parallel if they are targeting different hosts, which they are, but they still queue up.
Depending on the needs of the VM, it can take anywhere from 5-30 minutes for the playbook to complete. Today we had 141 VMs created. If we restrict the playbook to running sequentially, that would take between 12 and 70 hours.
My censored config.json is below. Have I misconfigured something? Have I misunderstood node concurrency?
Impact
Ansible (task execution)
Installation method
Package
Database
MySQL
Browser
No response
Semaphore Version
2.10.22-e44910d-1721658299
Ansible Version
Logs & errors
No response
Manual installation - system information
Configuration
Additional information
No response
The text was updated successfully, but these errors were encountered: