Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1221117 - Horizon: Re login failed after timeout
Horizon: Re login failed after timeout
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
urgent Severity high
: ga
: 7.0 (Kilo)
Assigned To: Matthias Runge
Ido Ovadia
: Triaged
: 1227371 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-13 06:20 EDT by Ami Jeain
Modified: 2018-02-08 05:40 EST (History)
14 users (show)

See Also:
Fixed In Version: python-django-horizon-2015.1.0-7.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1218894
Environment:
Last Closed: 2015-08-05 09:23:31 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)


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 13:07:06 EDT

  None (edit)
Description Ami Jeain 2015-05-13 06:20:23 EDT
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 08:35:40 EDT
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 13:22:21 EDT
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 05:17:22 EDT
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 10:03:33 EDT
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 02:14:28 EDT
*** Bug 1227371 has been marked as a duplicate of this bug. ***
Comment 11 Ido Ovadia 2015-06-14 10:11:50 EDT
Verified
========
python-django-horizon-2015.1.0-10.el7ost.noarch
Comment 12 Jasper Spit 2015-06-17 06:37:15 EDT
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 09:23:31 EDT
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.