DOA code fails on federated attribute of token

Bug #1451934 reported by Eric Peterson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Lin Hua Cheng
django-openstack-auth
Fix Released
High
Lin Hua Cheng

Bug Description

Seeing this problem with recent DOA, against keystone v2:

  File "/foo/current/.venv/lib/python2.7/site-packages/openstack_auth/utils.py", line 54, in middleware_get_user
    request._cached_user = get_user(request)
  File "/foo/.venv/lib/python2.7/site-packages/openstack_auth/utils.py", line 64, in get_user
    user = backend.get_user(user_id) or models.AnonymousUser()
  File "/foo/.venv/lib/python2.7/site-packages/openstack_auth/backend.py", line 78, in get_user
    endpoint, services_region)
  File "/foo/.venv/lib/python2.7/site-packages/openstack_auth/user.py", line 58, in create_user_from_token
    is_federated=token.is_federated,
AttributeError: 'Token' object has no attribute 'is_federated'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to django_openstack_auth (master)

Fix proposed to branch: master
Review: https://review.openstack.org/180236

Changed in django-openstack-auth:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
status: New → In Progress
Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

This can be reproduced if you are running db session and performing an upgrade

Changed in horizon:
status: New → Triaged
importance: Undecided → High
Changed in django-openstack-auth:
importance: Undecided → High
Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
Changed in django-openstack-auth:
milestone: none → 1.3.0
tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to django_openstack_auth (master)

Reviewed: https://review.openstack.org/180236
Committed: https://git.openstack.org/cgit/openstack/django_openstack_auth/commit/?id=d8f5c949df8adea1e932e9ff3d1f39a1af014d16
Submitter: Jenkins
Branch: master

commit d8f5c949df8adea1e932e9ff3d1f39a1af014d16
Author: lin-hua-cheng <email address hidden>
Date: Tue May 5 10:07:45 2015 -0700

    Set default value for new token attributes

    Two new attributes were recently added to token object:
    'unscoped_token' and 'is_federated'. When performing an
    upgrade, the existing token object stored in the session
    will not have the two attributes yet. This patch fixes
    the issue by providing a default value so it won't interrupt
    service for existing login user during an upgrade.

    Change-Id: I6adf974876294168e2326b5e10c14da2dd3e52ea
    Closes-bug: #1451934

Changed in django-openstack-auth:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to django_openstack_auth (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/180886

tags: added: ops
David Lyle (david-lyle)
Changed in django-openstack-auth:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to django_openstack_auth (stable/kilo)

Reviewed: https://review.openstack.org/180886
Committed: https://git.openstack.org/cgit/openstack/django_openstack_auth/commit/?id=d19c032abf932a6afc49423dc096fa8238e62687
Submitter: Jenkins
Branch: stable/kilo

commit d19c032abf932a6afc49423dc096fa8238e62687
Author: lin-hua-cheng <email address hidden>
Date: Tue May 5 10:07:45 2015 -0700

    Set default value for new token attributes

    Two new attributes were recently added to token object:
    'unscoped_token' and 'is_federated'. When performing an
    upgrade, the existing token object stored in the session
    will not have the two attributes yet. This patch fixes
    the issue by providing a default value so it won't interrupt
    service for existing login user during an upgrade.

    Change-Id: I6adf974876294168e2326b5e10c14da2dd3e52ea
    Closes-bug: #1451934
    (cherry picked from commit d8f5c949df8adea1e932e9ff3d1f39a1af014d16)

tags: added: in-stable-kilo
Changed in horizon:
milestone: none → liberty-rc1
status: Triaged → Fix Committed
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-rc1 → 8.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.