Bug 1221117 - Horizon: Re login failed after timeout
Summary: Horizon: Re login failed after timeout
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ga
: 7.0 (Kilo)
Assignee: Matthias Runge
QA Contact: Ido Ovadia
URL:
Whiteboard:
Keywords: Triaged
: 1227371 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-13 10:20 UTC by Ami Jeain
Modified: 2019-07-11 09:09 UTC (History)
14 users (show)

(edit)
Clone Of: 1218894
(edit)
Last Closed: 2015-08-05 13:23:31 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:1548 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2015-08-05 17:07:06 UTC

Internal Trackers: 1232683

Description Ami Jeain 2015-05-13 10:20:23 UTC
cloned for RHOS7
+++ This bug was initially created as a clone of Bug #1218894 +++

Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Matthias Runge on 2015-05-06 03:15:01 EDT ---

ValidationError: [u"'7473c59b3d584ec2ba305fd3b98f0724' value must be an integer."]
INFO openstack_auth.forms Login successful for user "admin".
ERROR django.request Internal Server Error: /dashboard/auth/login/

--- Additional comment from Matthias Runge on 2015-05-06 03:34:42 EDT ---



--- Additional comment from Matthias Runge on 2015-05-06 03:35:13 EDT ---

ValidationError: [u"'7473c59b3d584ec2ba305fd3b98f0724' value must be an integer."]
2015-05-06 06:54:18,098 10010 INFO openstack_auth.forms Login successful for user "admin".
2015-05-06 06:54:18,099 10010 ERROR django.request Internal Server Error: /dashboard/auth/login/
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
    return view(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/openstack_auth/views.py", line 111, in login
    **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
    return view(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/contrib/auth/views.py", line 51, in login
    auth_login(request, form.get_user())
  File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 102, in login
    if _get_user_session_key(request) != user.pk or (
  File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 59, in _get_user_session_key
    return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])
  File "/usr/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 969, in to_python
    params={'value': value},

--- Additional comment from Matthias Runge on 2015-05-06 03:37:05 EDT ---

workaround: clear cookies for horizon machine.

--- Additional comment from Ido Ovadia on 2015-05-06 03:46:33 EDT ---

Steps to Reproduce:
===================
1. Install openstack RDO (Kilo)
2. Use Horizon
3. Wait for timeout

Actual results:
================
Login fail

--- Additional comment from Alan Pevec on 2015-05-08 14:46:42 EDT ---

in kilo testing repo

Comment 3 Matthias Runge 2015-05-13 12:35:40 UTC
This is strange, as I wasn't able to reproduce the issue with a build including 
this fix:
https://github.com/redhat-openstack/django_openstack_auth/commit/59946474a7c0745ebc3eb422c40d3eb445b12028

Comment 4 Matthias Runge 2015-05-13 17:22:21 UTC
I even had a comment in launchpad[1], the fix for this issue [2] works.


[1] https://bugs.launchpad.net/horizon/+bug/1453754
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1218894

Comment 5 Fabio Massimo Di Nitto 2015-05-21 09:17:22 UTC
I am seeing this same issue using Firefox from fedora 21 and python-django-openstack-auth-1.2.0-2.el7ost.noarch

[Thu May 21 04:50:58.490484 2015] [:error] [pid 6942] Login successful for user "admin".
[Thu May 21 04:50:58.492690 2015] [:error] [pid 6942] Internal Server Error: /dashboard/auth/login/
[Thu May 21 04:50:58.492708 2015] [:error] [pid 6942] Traceback (most recent call last):
[Thu May 21 04:50:58.492711 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
[Thu May 21 04:50:58.492714 2015] [:error] [pid 6942]     response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Thu May 21 04:50:58.492716 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
[Thu May 21 04:50:58.492718 2015] [:error] [pid 6942]     return view(request, *args, **kwargs)
[Thu May 21 04:50:58.492720 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
[Thu May 21 04:50:58.492722 2015] [:error] [pid 6942]     response = view_func(request, *args, **kwargs)
[Thu May 21 04:50:58.492724 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
[Thu May 21 04:50:58.492726 2015] [:error] [pid 6942]     response = view_func(request, *args, **kwargs)
[Thu May 21 04:50:58.492728 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/openstack_auth/views.py", line 111, in login
[Thu May 21 04:50:58.492730 2015] [:error] [pid 6942]     **kwargs)
[Thu May 21 04:50:58.492731 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
[Thu May 21 04:50:58.492733 2015] [:error] [pid 6942]     return view(request, *args, **kwargs)
[Thu May 21 04:50:58.492735 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
[Thu May 21 04:50:58.492737 2015] [:error] [pid 6942]     response = view_func(request, *args, **kwargs)
[Thu May 21 04:50:58.492739 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
[Thu May 21 04:50:58.492741 2015] [:error] [pid 6942]     response = view_func(request, *args, **kwargs)
[Thu May 21 04:50:58.492742 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/views.py", line 51, in login
[Thu May 21 04:50:58.492744 2015] [:error] [pid 6942]     auth_login(request, form.get_user())
[Thu May 21 04:50:58.492746 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 102, in login
[Thu May 21 04:50:58.492756 2015] [:error] [pid 6942]     if _get_user_session_key(request) != user.pk or (
[Thu May 21 04:50:58.492758 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 59, in _get_user_session_key
[Thu May 21 04:50:58.492760 2015] [:error] [pid 6942]     return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])
[Thu May 21 04:50:58.492762 2015] [:error] [pid 6942]   File "/usr/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 969, in to_python
[Thu May 21 04:50:58.492765 2015] [:error] [pid 6942]     params={'value': value},
[Thu May 21 04:50:58.492767 2015] [:error] [pid 6942] ValidationError: [u"'463bf51083f5430cb4b44eba9742664b' value must be an integer."]

Login -> let the session timeout -> try to login again.

Comment 6 Matthias Runge 2015-05-21 14:03:33 UTC
OK, I think now I solved this by adding:
just below in 
/usr/share/openstack-dashboard/openstack_dashboard/settings.py:

TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
AUTHENTICATION_BACKENDS = ('openstack_auth.backend.KeystoneBackend',)
AUTHENTICATION_URLS = ['openstack_auth.urls']

AUTH_USER_MODEL = 'openstack_auth.User'


^^

add the AUTH_USER_MODEL line and restart httpd

Comment 7 Matthias Runge 2015-06-03 06:14:28 UTC
*** Bug 1227371 has been marked as a duplicate of this bug. ***

Comment 11 Ido Ovadia 2015-06-14 14:11:50 UTC
Verified
========
python-django-horizon-2015.1.0-10.el7ost.noarch

Comment 12 Jasper Spit 2015-06-17 10:37:15 UTC
It seems adding AUTH_USER_MODEL = 'openstack_auth.User' causes python /usr/share/openstack-dashboard /usr/share/openstack-dashboard/manage.py syncdb to fail. I have opened #1232683 for this.

Comment 14 errata-xmlrpc 2015-08-05 13:23:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2015:1548


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