Listing orphaned neutron objects with listorphans.py is slow
Bug #1515300 reported by
Nick Jones
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Operators |
Fix Released
|
Undecided
|
Nick Jones |
Bug Description
Listing orphaned neutron objects via the listorphans.py script is terribly slow, owing to that fact that for every instance of an object it does a distinct Keystone API call to check whether or not that object's tenant ID exists.
This could be streamlined by fetching a list of all project IDs once and then doing the comparison against that list to see if an object's associated tenant ID is still valid.
Changed in osops: | |
status: | New → In Progress |
assignee: | nobody → Nick Jones (yankcrime) |
Changed in osops: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/244160 /git.openstack. org/cgit/ openstack/ osops-tools- generic/ commit/ ?id=f243b8c739e 589a17bfcfe2fca 7ed5744e71900e
Committed: https:/
Submitter: Jenkins
Branch: master
commit f243b8c739e589a 17bfcfe2fca7ed5 744e71900e
Author: Nick Jones <email address hidden>
Date: Wed Nov 11 15:21:12 2015 +0000
Address performance issues with listorphans.py script
listorphans.py lists orphaned Neutron objects. 'Orphans' in this
context are objects which OpenStack knows about and manages but which do
not have a valid project (tenant) ID.
The previous version was very inefficient in that for every object being
checked, it would do a discrete Keystone API call to see if the
associated tenant ID was valid or not. For an installation of any
reasonable size, i.e one with 100s of Neutron routers, this method was
particularly slow.
The script has been updated to first build a list of all tenant IDs, and
then for every Neutron object check project ownership validity against
this list instead.
Output has also changed slightly to print out a list of discovered
orphans, simplifying workflow e.g when piping to another command which
cleans up these objects.
Closes-Bug: #1515300
Change-Id: I72ca84fe48beb6 23d43ee446a32ea 1bb30730bcc