test_basic_scenario fails in the gate with a 500 error

Bug #1212405 reported by Matt Riedemann
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Critical
Kieran Spear
tempest
Invalid
Undecided
Kieran Spear
Revision history for this message
Kieran Spear (kspear) wrote :

I get a 500 by logging in on Horizon commit 11dff26cec32a7c77c2c19a31a46fbcb32324843 and then switching to commit 7e7965f875c01ef7e23c7910ea87765f861b571f. It's strange that this would be happening on the gate though, since I wouldn't expect sessions to persist between jobs...

Proposed a change to revert 11dff26cec32a7c77c2c19a31a46fbcb32324843 to see if it fixes things:

https://review.openstack.org/#/c/42033/

Revision history for this message
Xavier Queralt (xqueralt-deactivatedaccount) wrote :

I was able to hunt down the origin of this issue to the fact that we patch django auth middleware's get_user method too late.

It looks like the AuthenticationMiddleware called before loading openstack_auth's urls module (where the patching happens) and this leads to the first request being associated with the original get_user method and crashing if accessing to the user attribute.

This is where the middleware gets patched now:
https://github.com/openstack/django_openstack_auth/blob/master/openstack_auth/urls.py#L5

If instead it is patched from the settings module, the issue is fixed. I don't know if that's the correct place to patch it though.

Revision history for this message
Eric Peterson (ericpeterson-l) wrote :

This does seem to work better / correctly. Good idea Xavier!

https://review.openstack.org/#/c/42240/

Kieran Spear (kspear)
Changed in horizon:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → Kieran Spear (kspear)
David Lyle (david-lyle)
Changed in horizon:
milestone: none → havana-3
Kieran Spear (kspear)
Changed in tempest:
status: New → Invalid
assignee: nobody → Kieran Spear (kspear)
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: havana-3 → 2013.2
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.