Horizon makes duplicated and extra requests

Bug #1592940 reported by Andrey Grebennikov
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Ivan Kolodyazhny

Bug Description

Horizon Liberty

User reports slowness of the dashboard for most of the tabs.
Investigation shows that Horizon makes duplicated requests when it is trying to request information related to the networking. It also waits for about 4 seconds right after the initial user's successfull authentication before it proceeds with the first API call.

Here is the log of Horizon representing the delay:

2016-06-15 18:24:16,385 113992 DEBUG openstack_auth.backend Beginning user authentication
2016-06-15 18:24:16,387 113992 DEBUG openstack_auth.plugin.password Attempting to authenticate for admin
2016-06-15 18:24:16,387 113992 DEBUG keystoneclient.auth.identity.v3.base Making authentication request to http://192.168.210.69:5000/v3/auth/tokens
2016-06-15 18:24:16,481 113992 DEBUG keystoneclient.session REQ: curl -g -i --insecure -X GET http://192.168.210.69:5000/v3/ -H "Accept: application/j
son" -H "User-Agent: python-keystoneclient"
2016-06-15 18:24:16,503 113992 DEBUG keystoneclient.session RESP: [200] content-length: 253 vary: X-Auth-Token server: Apache connection: close date:
Wed, 15 Jun 2016 18:24:16 GMT content-type: application/json x-openstack-request-id: req-258d4e76-6500-414d-a565-0788dc0d4f90
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.o
penstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://192.168.210.69:5000/v3/", "rel": "self"}]}}

2016-06-15 18:24:16,503 113992 DEBUG keystoneclient.session REQ: curl -g -i --insecure -X GET http://192.168.210.69:5000/v3/users/51e3873fe48f4948bef2
32865c7bc84f/projects -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}561e3b22c0693b6ff8dfad099a2492d95ed
8e9c1"
2016-06-15 18:24:16,561 113992 DEBUG keystoneclient.session RESP: [200] content-length: 412 vary: X-Auth-Token server: Apache connection: close date:
Wed, 15 Jun 2016 18:24:16 GMT content-type: application/json x-openstack-request-id: req-765b3844-feb3-40b9-a843-f5cc2341afde
RESP BODY: {"links": {"self": "http://192.168.210.69:5000/v3/users/51e3873fe48f4948bef232865c7bc84f/projects", "previous": null, "next": null}, "proje
cts": [{"is_domain": false, "description": "admin tenant", "links": {"self": "http://192.168.210.69:5000/v3/projects/49cdffc876ca4927af2ea7505ad27264"
}, "enabled": true, "id": "49cdffc876ca4927af2ea7505ad27264", "parent_id": null, "domain_id": "default", "name": "admin"}]}

2016-06-15 18:24:16,561 113992 DEBUG keystoneclient.auth.identity.v3.base Making authentication request to http://192.168.210.69:5000/v3/auth/tokens
2016-06-15 18:24:16,657 113992 DEBUG openstack_auth.backend Authentication completed.
2016-06-15 18:24:16,657 113992 INFO openstack_auth.forms Login successful for user "admin".
2016-06-15 18:24:20,167 113996 DEBUG neutronclient.client REQ: curl -i https://domain.com:9696/v2.0/extensions.json -X GET -H "User-Agent: pyt
hon-neutronclient" -H "X-Auth-Token: {SHA1}04486c34b57ca19787b77e6d5e6e9fad48914b67"

Last 2 rows represent the issue.

I'll attach parsed logs for each tab opening in order to show duplicated requests.

Revision history for this message
Andrey Grebennikov (agrebennikov) wrote :
Timur Sufiev (tsufiev-x)
summary: - Horizon makes duclicated and extra requests
+ Horizon makes dublicated and extra requests
summary: - Horizon makes dublicated and extra requests
+ Horizon makes duplicated and extra requests
Timur Sufiev (tsufiev-x)
Changed in horizon:
importance: Undecided → Medium
assignee: nobody → Timur Sufiev (tsufiev-x)
Changed in horizon:
status: New → In Progress
Changed in horizon:
assignee: Timur Sufiev (tsufiev-x) → Paul Karikh (pkarikh)
Changed in horizon:
milestone: none → newton-rc1
Changed in horizon:
milestone: newton-rc1 → next
Changed in horizon:
assignee: Paul Karikh (pkarikh) → Rob Cresswell (robcresswell)
Changed in horizon:
assignee: Rob Cresswell (robcresswell) → Ivan Kolodyazhny (e0ne)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/334335
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6f982b3ead5beff7ae68ff70ea8e63da5acc05b2
Submitter: Jenkins
Branch: master

commit 6f982b3ead5beff7ae68ff70ea8e63da5acc05b2
Author: Timur Sufiev <email address hidden>
Date: Fri Jun 17 13:50:12 2016 +0300

    Fix duplicating <network_entity>_list() calls in api.network

    The solution is trivial - to add @memoize decorator to the following
    calls:
    * api.neutron.subnet_list
    * api.neutron.port_list
    * api.network.tenant_floating_ip_list
    * api.network.security_group_list

    Closes-Bug: #1592940
    Co-Authored-By: Ivan Kolodyazhny <email address hidden>
    Change-Id: Ibc0d227e07adfcc18bd2d0ed114d1da0f4ff04ad

Changed in horizon:
status: In Progress → Fix Released
Changed in horizon:
milestone: next → pike-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b2

This issue was fixed in the openstack/horizon 12.0.0.0b2 development milestone.

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.