Bug 983097 - horizon: no page redirection when user session expires
horizon: no page redirection when user session expires
Status: CLOSED DUPLICATE of bug 976272
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity medium
: ---
: 4.0
Assigned To: Julie Pichon
Ami Jeain
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-10 09:44 EDT by Dafna Ron
Modified: 2015-06-04 17:52 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-26 04:17:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Dafna Ron 2013-07-10 09:44:01 EDT
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 12:50:32 EDT
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 04:17:50 EDT

*** 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.