Slow inventory sync for VMware

I’ve got a fresh install of 7.0.0 that I am trying to use with my vCenter. I’ve got the inventory source set up, but it’s taking over 30 minutes to load. Can anyone confirm is this is typical, or is something wrong?

I’ve tried using instance filters to reduce the number of hosts, but I can’t get them working. There are no functional examples anywhere, and with a 30 minute runtime debugging is a bit slow.

Here’s the job output of a (slowly) working sync

2.567 INFO Updating inventory 2: vCenter
3.007 INFO Reading Ansible inventory source: /var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/plugins/inventory/vmware_inventory.py
3.009 INFO Using VIRTUAL_ENV: /var/lib/awx/venv/ansible
3.009 INFO Using PATH: /var/lib/awx/venv/ansible/bin:/var/lib/awx/venv/awx/bin:/opt/rh/rh-postgresql10/root/usr/bin:/var/lib/awx/venv/awx/bin:/var/lib/awx/venv/awx/bin:/opt/rh/rh-postgresql10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
3.009 INFO Using PYTHONPATH: /var/lib/awx/venv/ansible/lib/python2.7/site-packages:
2036.709 ERROR ansible-inventory 2.8.5
2036.709 ERROR config file = /etc/ansible/ansible.cfg
2036.709 ERROR configured module search path = [u’/var/lib/awx/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
2036.709 ERROR ansible python module location = /usr/lib/python2.7/site-packages/ansible
2036.710 ERROR executable location = /usr/bin/ansible-inventory
2036.710 ERROR python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
2036.710 ERROR Using /etc/ansible/ansible.cfg as config file
2036.710 ERROR Parsed /var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/plugins/inventory/vmware_inventory.py inventory source with script plugin
2036.840 INFO Processing JSON output…
2036.853 INFO Loaded 22 groups, 446 hosts
2019-10-15 15:45:28,695 DEBUG awx.main.models.inventory Going to update inventory computed fields, pk=2
2019-10-15 15:45:31,681 DEBUG awx.main.models.inventory Finished updating inventory computed fields, pk=2, in 2.985 seconds
2044.115 INFO Inventory import completed for vcenter in 2041.6s

Mike

We have a vmware vCenter inventory which sometimes runs for 11 hours !!! and we are using the inventory script which is available with Ansible. I am not sure what is the issue but when i run it manually it runs fine. So we have ended up creating another vmware custom script which runs pretty fast but we have to use awx-manage to import the inventory file.

Mike,
I have the exact same issue. I want to enable “Update on Launch” but I have a 15 minute delay on one of my inventory sources. Hope someone can shed some light on how to resolve this.

I tried setting up the same install of AWX on a VM inside the vCenter and ran the exact same sync. The time to load dropped from 35 minutes to about 5. It appears that a big part of the slowdown is related to the latency between our datacenter (in Colorado) and the AWS center (in Oregon).

I don’t have time to figure out of this is due to the network, the firewall or one of a bunch of other things, but it’s progress.