Horizon quota collection is suboptimal

Bug #1512411 reported by Timur Sufiev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Triaged
Wishlist
Paul Karikh

Bug Description

Confirmed on:
stable/kilo
stable/juno

Issue:
When user accesses `horizon/project/access_and_security/` page, this triggers a call to api/network->tenant_floating_ip_list, and this happens for each tab with preload = True (default) which has any related quotas in table_actions field of the related table.

Details:
For example for keypairs tab it is
table_actions = (CreateKeyPair, ImportKeyPair, DeleteKeyPairs,
                         KeypairsFilterAction,)
Here `CreateKeyPair` will trigger call to quotas.tenant_quota_usages(request) check which will in turn call tenant_floating_ip_list.

On default stable/kilo and stable/juno the call to floating_ip_list happens 2 times on this page.
If we set preload = False in https://github.com/openstack/horizon/blob/master/horizon/tabs/base.py#L257 then floating_ip_list is called once, but will also happen for Keypairs tab, and 2 times for FloaitngIPs tab (once for quotas and another time to actually get the IPs).

Current quota retrieval mechanism is suboptimal and should be cached to not duplicate calls for tabs or allow doing calls to get specific quota (for example, only keypair quota or only floatingip quota).

Current code assumes fast/cheap API response which may sometimes not be true - for huge clouds for example.

Tags: large-scale
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/248151

Changed in horizon:
assignee: nobody → Paul Karikh (pkarikh)
status: New → In Progress
Changed in horizon:
status: In Progress → Confirmed
assignee: Paul Karikh (pkarikh) → nobody
importance: Undecided → Wishlist
milestone: none → ongoing
status: Confirmed → Triaged
Revision history for this message
Paul Karikh (pkarikh) wrote :

Going to work on it.

Changed in horizon:
assignee: nobody → Paul Karikh (pkarikh)
Changed in horizon:
milestone: ongoing → next
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/248151
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.