Horizon quota collection sub-optimal

Bug #1512391 reported by Dmitry Sutyagin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Confirmed
Medium
MOS Horizon
6.0.x
Won't Fix
Medium
MOS Maintenance
6.1.x
Won't Fix
Undecided
MOS Maintenance
7.0.x
Won't Fix
Undecided
MOS Maintenance
8.0.x
Won't Fix
Medium
Timur Sufiev
9.x
Won't Fix
Medium
Paul Karikh

Bug Description

Confirmed on:
MOS 7.0
MOS 6.0

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 MOS 7.0 and 6.0 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.

description: updated
Revision history for this message
Timur Sufiev (tsufiev-x) wrote :
Changed in mos:
status: New → Confirmed
importance: Undecided → Medium
Timur Sufiev (tsufiev-x)
tags: added: horizon
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

Setting this as Won't Fix for updates branches as this is predicted behaviour and not a bug. Besides, fixing this bug will break the compatibility.

Revision history for this message
Paul Karikh (pkarikh) wrote :

Upstream patch in progress: https://review.openstack.org/#/c/248151/

Revision history for this message
Roman Rufanov (rrufanov) wrote :

Customer found on 6.0 - need fix.

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Given inferior unit-test coverage of Quota subsystem in Horizon, we cannot fix this issue reliably in a remaining week before SCF, thus moving it to 9.0. The plan is first to improve test coverage, then finalize quota calls optimization.

Changed in mos:
milestone: 8.0 → 9.0
tags: added: enhancement
tags: added: wontfix-feature
Timur Sufiev (tsufiev-x)
Changed in mos:
assignee: Timur Sufiev (tsufiev-x) → Paul Karikh (pkarikh)
Revision history for this message
Alexey Stupnikov (astupnikov) wrote :

Set this bug's status to Won't fix (wontfix-low) since 6.0 is now in Limited support status and only security fixes are accepted.

tags: added: wontfix-low
Timur Sufiev (tsufiev-x)
tags: added: move-to-10.0
Revision history for this message
Dina Belova (dbelova) wrote :

Won't fix for 9.0 due to medium priority and lots other issues to be fixed. Targeting to 10.0

Changed in mos:
milestone: 9.0 → 10.0
tags: added: 10.0-reviewed
Changed in mos:
assignee: Paul Karikh (pkarikh) → MOS Horizon (mos-horizon)
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.