Bug 1450475

Summary: Execution time of /bin/tripleo-ansible-inventory way too high
Product: Red Hat OpenStack Reporter: Andreas Karis <akaris>
Component: openstack-tripleo-validationsAssignee: Florian Fuchs <flfuchs>
Status: CLOSED DUPLICATE QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: medium    
Version: 11.0 (Ocata)CC: akrivoka, beth.white, flfuchs, jjoyce, jschluet, slinaber, tvignaud
Target Milestone: rcKeywords: Triaged
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-validations-7.4.2-1.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1513593 (view as bug list) Environment:
Last Closed: 2017-11-21 09:31:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1513593    

Description Andreas Karis 2017-05-12 17:17:44 UTC
Description of problem:
Execution time of /bin/tripleo-ansible-inventory way too high

Version-Release number of selected component (if applicable):
[root@undercloud-4 ~]# rpm -qf /bin/tripleo-ansible-inventory
openstack-tripleo-validations-5.5.0-1.el7ost.noarch

Actual results:
[stack@undercloud-4 ~]$ time tripleo-ansible-inventory --list
{"overcloud": {"children": ["controller", "compute"], "vars": {"ansible_ssh_user": "heat-admin"}}, "controller": ["192.168.24.12"], "undercloud": {"hosts": ["localhost"], "vars": {"overcloud_horizon_url": "http://10.0.0.5:80/dashboard", "overcloud_admin_password": "dzd8PRdB4TWGGygkCDGdUHrkY", "ansible_connection": "local"}}, "compute": ["192.168.24.9", "192.168.24.7"]}

real	1m12.398s
user	0m0.779s
sys	0m0.110s


Expected results:
< 1 second execution time on any system

Additional info:
run in a virtual undercloud, however, as this doesn't do anything more than list a few hosts and passwords, it should not take this long

Comment 3 Florian Fuchs 2017-09-05 10:17:18 UTC
There have been several performance improvements to the inventory in Ocata (backported) and Pike.

However, because there are a number of API calls involved when creating the dynamic inventory result, expecting an execution time of < 1s is maybe not realistic. The inventory has a --static-inventory option though which writes the result to a static inventory file. This should help where performance is critical.

Comment 7 Ana Krivokapic 2017-11-21 09:31:56 UTC

*** This bug has been marked as a duplicate of bug 1487759 ***