Bug 983097 - horizon: no page redirection when user session expires
Summary: horizon: no page redirection when user session expires
Keywords:
Status: CLOSED DUPLICATE of bug 976272
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: 4.0
Assignee: Julie Pichon
QA Contact: Ami Jeain
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-10 13:44 UTC by Dafna Ron
Modified: 2015-06-04 21:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-26 08:17:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log (2.82 KB, application/x-xz)
2013-07-10 13:44 UTC, Dafna Ron
no flags Details

Description Dafna Ron 2013-07-10 13:44:01 UTC
Created attachment 771619 [details]
log

Description of problem:

I have encountered this several times. 
when I have not logged in to the UI in a long time and try to access the following link from my browser cache: 
http://<ip>/dashboard/project/instances/ 

I get the requested page with the following error alert: 'Unauthorized : unable to retrieve instances' 

if session has expired we should redirect to the login page. 

Version-Release number of selected component (if applicable):

python-django-horizon-2013.1.2-1.el6ost.noarch

How reproducible:

100%

Steps to Reproduce:
1. try to login to horizon/instances after a day of not logging in to the system
2.
3.

Actual results:

we fail to retrieve information with unauthorized error 

Expected results:

horizon should automatically redirect the page when session has expired. 

Additional info: log


ESC[31;1mUnauthorized: Unauthorized (HTTP 401)ESC[0m
Traceback (most recent call last):
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/instances/views.py", line 54, in get_data
    instances = api.nova.server_list(self.request)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/nova.py", line 372, in server_list
    for s in novaclient(request).servers.list(True, search_opts)]
  File "/usr/lib/python2.6/site-packages/novaclient/v1_1/servers.py", line 375, in list
    return self._list("/servers%s%s" % (detail, query_string), "servers")
  File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 62, in _list
    _resp, body = self.api.client.get(url)
  File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 230, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 227, in _cs_request
    raise e
Unauthorized: Unauthorized (HTTP 401)
Failed to retrieve quota information
Traceback (most recent call last):
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/instances/tables.py", line 176, in allowed
    limits = api.nova.tenant_absolute_limits(request, reserved=True)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/nova.py", line 547, in tenant_absolute_limits
    limits = novaclient(request).limits.get(reserved=reserved).absolute
  File "/usr/lib/python2.6/site-packages/novaclient/v1_1/limits.py", line 81, in get
    return self._get("/limits%s" % query_string, "limits")
  File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 140, in _get
    _resp, body = self.api.client.get(url)
  File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 230, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 227, in _cs_request
    raise e
Unauthorized: Unauthorized (HTTP 401)
Failed to retrieve quota information
Traceback (most recent call last):
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/instances/tables.py", line 176, in allowed
    limits = api.nova.tenant_absolute_limits(request, reserved=True)
  File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/nova.py", line 547, in tenant_absolute_limits
    limits = novaclient(request).limits.get(reserved=reserved).absolute
  File "/usr/lib/python2.6/site-packages/novaclient/v1_1/limits.py", line 81, in get
    return self._get("/limits%s" % query_string, "limits")
  File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 140, in _get
    _resp, body = self.api.client.get(url)
  File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 230, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 227, in _cs_request
    raise e

Comment 1 Julie Pichon 2013-07-16 16:50:32 UTC
I can reproduce although not consistently. When I do see this error, clicking on another panel link usually redirects to the login page, as expected.

Tip to reproduce more easily: edit keystone.conf "expiration" setting to a low number and restart keystone.

Comment 2 Julie Pichon 2013-07-26 08:17:50 UTC

*** This bug has been marked as a duplicate of bug 976272 ***


Note You need to log in before you can comment on or make changes to this bug.