horizon's nova api should cache extensions list

Bug #1258593 reported by Rob Raymond
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Yves-Gwenael Bourhis

Bug Description

Currently nova api code memoize's calls to get extensions from nova. But there is a cache hit only if request arg is the same.
Since get extensions is called in many places and extensions are not dynamic, we should cache more aggressively regardless of request.

Changed in horizon:
assignee: nobody → Rob Raymond (rob-raymond)
description: updated
Akihiro Motoki (amotoki)
Changed in horizon:
importance: Undecided → Medium
milestone: none → next
status: New → Confirmed
David Lyle (david-lyle)
Changed in horizon:
assignee: Rob Raymond (rob-raymond) → nobody
Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
Changed in horizon:
assignee: Lin Hua Cheng (lin-hua-cheng) → nobody
Changed in horizon:
assignee: nobody → Yves-Gwenael Bourhis (yves-gwenael-bourhis)
Revision history for this message
Yves-Gwenael Bourhis (yves-gwenael-bourhis) wrote :

I started working on it.

I started by making a new memoization decorator to which I pass the attributes of "request" I want to use for memoization.
the list_extensions method only needs the 'user' attribut of the request.
I noticed the following: The user instance of the request object is always the same... even when logging out and in again...
weakref.ref references the same object when logging out and logging in another user because only the user object's attributes (tenant_id, etc...) are changed.... This means that memoizing on the user will not work unless we instantiate a new user object instead of changing the attribute values.

I'll push a draft soon.

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/150392

Changed in horizon:
status: Confirmed → In Progress
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/150392
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.

Revision history for this message
Yves-Gwenael Bourhis (yves-gwenael-bourhis) wrote :

review reactivated, sorry for the delay.

Changed in horizon:
assignee: Yves-Gwenael Bourhis (yves-gwenael-bourhis) → Timur Sufiev (tsufiev-x)
Timur Sufiev (tsufiev-x)
Changed in horizon:
assignee: Timur Sufiev (tsufiev-x) → Yves-Gwenael Bourhis (yves-gwenael-bourhis)
Changed in horizon:
assignee: Yves-Gwenael Bourhis (yves-gwenael-bourhis) → Daniel Castellanos (luis-daniel-castellanos)
Changed in horizon:
assignee: Daniel Castellanos (luis-daniel-castellanos) → Yves-Gwenael Bourhis (yves-gwenael-bourhis)
David Lyle (david-lyle)
Changed in horizon:
status: In Progress → Fix Released
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: next → none
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.