tripleo-ansible-inventory is very slow
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
Medium
|
Florian Fuchs |
Bug Description
(undercloud) [stack@undercloud ~]$ time tripleo-
{"overcloud": {"children": ["controller", "compute"], "vars": {"ansible_
real 1m0.176s
user 0m1.797s
sys 0m0.108s
So it takes a whole minute just to list an inventory. This makes it very suboptimal to use.
I think we can improve on two fronts here:
1) Add an option to dump the inventory as a proper ansible inventory file. So I can do "ansible -i inventory-file-dump -m ping" and generally run ansible commands without having to wait a whole minute every time.
2) Speed up the query. I have added a bit of timing calls:
(undercloud) [stack@undercloud ~]$ time tripleo-
_parse_config start: 1494411583.93
_parse_config end: 1494411583.93
list start: 1494411583.93
get_overcloud_
get_overcloud_
get_overcloud_
get_overcloud_
get_overcloud_
get_overcloud_
get_overcloud_
get_overcloud_
fetch_stack_
fetch_stack_
fetch_stack_
fetch_stack_
fetch_stack_
fetch_stack_
list end: 1494411642.13
{"overcloud": {"children": ["controller", "compute"], "vars": {"ansible_
real 0m58.857s
user 0m1.784s
sys 0m0.094s
So we can probably use a single get_overcloud_
Changed in tripleo: | |
assignee: | nobody → Florian Fuchs (flo-fuchs) |
status: | Triaged → In Progress |
This patch adds some optimizations to the inventory: https:/ /review. openstack. org/#/c/ 450233/