API client object like novaclient is created every time openstack_dashboard/api methods are called

Bug #1352144 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Akihiro Motoki

Bug Description

In API modules in openstack_dashboard api such as novaclient, neutronclient and so on, API client objects (novaclient, neutronclient...) are created every time openstack_dashboard/api methods are called even in a same request.
Recreating API client object leads to recreating API HTTP connections.

In a same request, API client object should be reused as possible as we can to reduce the number of connections to backend servers.

Note that keystoneclient in openstack_dashboard/api is the only module which implements the client object caching.[1]

[1] http://git.openstack.org/cgit/openstack/horizon/tree/openstack_dashboard/api/keystone.py#n121

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

Changed in horizon:
status: New → In Progress
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-3 → juno-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/111654
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=69e0d812f294aefcff6f551ad2dd264497ed9215
Submitter: Jenkins
Branch: master

commit 69e0d812f294aefcff6f551ad2dd264497ed9215
Author: Akihiro Motoki <email address hidden>
Date: Mon Aug 4 15:07:04 2014 +0900

    Reuse API client object in a request

    Previously API client object like novaclient are created
    every time methods in openstack_dashboard/api.
    It leads to regeneration of API HTTP connections.
    This commit caches API client object for a WSGI request
    to reduce the number of HTTP connection to backends.
    As WSGI request object is recreated, a cached API client
    object will live in a single request to Horizon.

    Change-Id: I66620b3b0a2737c7232d91006e65d0fabbd3090b
    Closes-Bug: #1352144

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-rc1 → 2014.2
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.