Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 983097

Summary: horizon: no page redirection when user session expires
Product: Red Hat OpenStack Reporter: Dafna Ron <dron>
Component: python-django-horizonAssignee: Julie Pichon <jpichon>
Status: CLOSED DUPLICATE QA Contact: Ami Jeain <ajeain>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: aortega, athomas, jkt, jpichon, mrunge, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-26 08:17:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
log none

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