Bug 1218894 - Horizon: Re login failed after timeout
Horizon: Re login failed after timeout
Status: CLOSED CURRENTRELEASE
Product: RDO
Classification: Community
Component: python-django-openstack-auth (Show other bugs)
Kilo
Unspecified Unspecified
urgent Severity high
: ---
: Kilo
Assigned To: Matthias Runge
Ido Ovadia
: Reopened
: 1218907 (view as bug list)
Depends On:
Blocks: 1218896
  Show dependency treegraph
 
Reported: 2015-05-06 03:12 EDT by Ido Ovadia
Modified: 2016-05-09 17:35 EDT (History)
14 users (show)

See Also:
Fixed In Version: python-django-openstack-auth-1.2.0-2 python-django-horizon-2015.1.0-6.el7 python-django-openstack-auth-1.2.0-6.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1221117 (view as bug list)
Environment:
Last Closed: 2016-05-09 11:10:41 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
Launchpad 1491117 None None None Never

  None (edit)
Description Ido Ovadia 2015-05-06 03:12:26 EDT
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:
Comment 1 Matthias Runge 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/
Comment 2 Matthias Runge 2015-05-06 03:34:42 EDT
*** Bug 1218907 has been marked as a duplicate of this bug. ***
Comment 3 Matthias Runge 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},
Comment 4 Matthias Runge 2015-05-06 03:37:05 EDT
workaround: clear cookies for horizon machine.
Comment 5 Ido Ovadia 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
Comment 6 Alan Pevec 2015-05-08 14:46:42 EDT
in kilo testing repo
Comment 7 Salman Khan 2015-05-21 06:02:56 EDT
I still see this issue. I have to clear the cache whenever session timeout to login again. 

[root@ctr-rdo-kilo ]# rpm -q python-django-openstack-auth
python-django-openstack-auth-1.2.0-2.el7.noarch

[root@ctr-rdo-kilo ]# tail -f /var/log/horizon/horizon.log
2015-05-20 15:55:31,704 11818 WARNING django.request Not Found: /dashboard/static/horizon/lib/font-awesome/fonts/fontawesome-webfont.woff
2015-05-20 15:55:32,256 11817 WARNING django.request Not Found: /dashboard/static/horizon/lib/font-awesome/fonts/fontawesome-webfont.ttf
2015-05-20 15:56:51,490 11818 WARNING django.request Not Found: /dashboard/static/horizon/lib/font-awesome/fonts/fontawesome-webfont.woff
2015-05-20 15:56:51,632 11818 WARNING django.request Not Found: /dashboard/static/horizon/lib/font-awesome/fonts/fontawesome-webfont.ttf
2015-05-21 10:00:29,604 11819 WARNING django.request Not Found: /dashboard/static/horizon/lib/font-awesome/fonts/fontawesome-webfont.woff
2015-05-21 10:00:29,648 11819 WARNING django.request Not Found: /dashboard/static/horizon/lib/font-awesome/fonts/fontawesome-webfont.ttf
2015-05-21 10:00:33,632 11819 INFO openstack_auth.forms Login successful for user "admin".
2015-05-21 10:00:33,662 11819 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},
ValidationError: [u"'90704a0fbaca4b40b38bcf90121bba02' value must be an integer."]
Comment 8 Ido Ovadia 2015-05-21 09:05:57 EDT
Failed QA
==========
python-django-openstack-auth-1.2.0-2.el7ost.noarch
Comment 9 Matthias Runge 2015-05-22 13:35:44 EDT
Until this lands in repos, folks can fetch the fixed package from
http://cbs.centos.org/koji/buildinfo?buildID=1256
Comment 10 Alan Pevec 2015-05-26 05:27:30 EDT
RDO update: https://review.gerrithub.io/234335
Comment 11 Sascha Spreitzer 2015-09-15 05:12:35 EDT
Hi I am running most current openstack-kilo with public python-django-openstack-auth-1.2.0-4.el7.noarch. Problem persists..

Can we please reopen the bug?
Comment 12 Matthias Runge 2015-09-15 06:34:04 EDT
You're seeing a different issue.

one patch in kilo python-django-openstack-auth was replaced by the version from upstream, which re-introduced the issue.

This is currently being investigated upstream
https://review.openstack.org/#/c/222478/

Once this has been solved, I'll pull in the patch.
Comment 13 Sascha Spreitzer 2015-09-15 08:37:52 EDT
Ah thanks!
Comment 14 Tyler Wilson 2015-10-01 13:35:22 EDT
(In reply to Matthias Runge from comment #12)
> You're seeing a different issue.
> 
> one patch in kilo python-django-openstack-auth was replaced by the version
> from upstream, which re-introduced the issue.
> 
> This is currently being investigated upstream
> https://review.openstack.org/#/c/222478/
> 
> Once this has been solved, I'll pull in the patch.

Looks like that has been merged, whats the ETA on this hitting RDO?
Comment 15 Matthias Runge 2015-10-02 02:15:27 EDT
I would expect this to land in RDO when 2015.1.2 was released, there is another patch for horizon required, which has been merged for liberty. There was a bit fall-out around the patch.
Comment 16 Christopher Brown 2015-10-02 04:27:00 EDT
Hi. I have attempted to apply the patch but I'm still getting the same error. Is there anywhere I can pull in a quick fix from?
Thanks
Comment 17 Matthias Runge 2015-10-02 04:28:22 EDT
Christopher, this requires at least 3 patches in total, in Horizon and for python-django-openstack-auth.
Comment 18 Christopher Brown 2015-10-02 07:36:25 EDT
Thanks Matthias.
It's currently a bit of a problem for PoC environments for clients.
Any workarounds appreciated.
I've tried extending the SESSION_TIMEOUT value but this doesn't appear to be helping, possibly hitting some keystone limit?
Comment 19 Matthias Runge 2015-10-02 08:11:11 EDT
I built a testing django-openstack-auth here:
https://copr-be.cloud.fedoraproject.org/results/mrunge/Horizon-Kilo/epel-7-x86_64/00122406-python-django-openstack-auth/python-django-openstack-auth-1.2.0-6.el7.centos.noarch.rpm

Apparently two changes to /etc/openstack-dashboard/local_settings are required:
adding: 
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

(make sure, you have a cache configured. Packstack does that, for example.
and
AUTH_USER_MODEL = 'openstack_auth.User'

This is something like a workaround, but shouldn't do any harm.
Comment 20 Fedora Update System 2015-10-15 15:37:33 EDT
python-django-openstack-auth-1.2.0-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-ab182d465e
Comment 21 Fedora Update System 2015-10-15 23:02:53 EDT
python-django-openstack-auth-1.2.0-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update python-django-openstack-auth'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-ab182d465e
Comment 22 Alan Pevec 2015-10-28 17:57:32 EDT
python-django-horizon-2015.1.2-1.el7 and python-django-openstack-auth-1.2.0-6.el7 are in the RDO Kilo testing repo:
http://cbs.centos.org/repos/cloud7-openstack-kilo-testing/x86_64/os/
Comment 23 Matthias Runge 2015-10-28 19:40:42 EDT
Alan, what is the reason you added FailedQA here?
Comment 24 Fedora Update System 2015-11-02 13:54:31 EST
python-django-openstack-auth-1.2.0-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 25 Ido Ovadia 2016-05-09 04:35:28 EDT
Failed QA
=========
python-django-horizon-2015.1.3-2.el7ost.noarch
Comment 27 Matthias Runge 2016-05-09 11:11:32 EDT
Closing this again; If there is a current bug in RDO version of horizon, please file a new bug.

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