Bug 1221117
| Summary: | Horizon: Re login failed after timeout | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Ami Jeain <ajeain> |
| Component: | python-django-horizon | Assignee: | Matthias Runge <mrunge> |
| Status: | CLOSED ERRATA | QA Contact: | Ido Ovadia <iovadia> |
| Severity: | high | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 7.0 (Kilo) | CC: | aortega, athomas, fdinitto, iovadia, js, Kevin.Fox, madko, mrunge, nbarcet, racedoro, sclewis, wdaniel, yeylon |
| Target Milestone: | ga | Keywords: | Triaged |
| Target Release: | 7.0 (Kilo) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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 13:23:31 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: | |||
|
Description
Ami Jeain
2015-05-13 10:20:23 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 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 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.
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
*** Bug 1227371 has been marked as a duplicate of this bug. *** Verified ======== python-django-horizon-2015.1.0-10.el7ost.noarch 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. 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 |