Expired Auth Token Deletion Failure

Bug #718999 reported by Brian Waldon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Kevin L. Mitchell

Bug Description

When using an expired auth token in the openstack api, the call to db/sqlalchemy/api.py auth_destroy_token fails:

2011-02-14 21:03:04,399 ERROR nova.api.openstack [-] Caught error: Object '<AuthToken at 0x301cb90>' is already attached to session '48825808' (this is '50390416')
(nova.api.openstack): TRACE: Traceback (most recent call last):
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/openstack/__init__.py", line 52, in __call__
(nova.api.openstack): TRACE: return req.get_response(self.application)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/request.py", line 919, in get_response
(nova.api.openstack): TRACE: application, catch_exc_info=False)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/request.py", line 887, in call_application
(nova.api.openstack): TRACE: app_iter = application(self.environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
(nova.api.openstack): TRACE: resp = self.call_func(req, *args, **self.kwargs)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
(nova.api.openstack): TRACE: return self.func(req, *args, **kwargs)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/openstack/auth.py", line 53, in __call__
(nova.api.openstack): TRACE: user = self.get_user_by_authentication(req)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/openstack/auth.py", line 66, in get_user_by_authentication
(nova.api.openstack): TRACE: return self.authorize_token(req.headers["X-Auth-Token"])
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/openstack/auth.py", line 110, in authorize_token
(nova.api.openstack): TRACE: self.db.auth_destroy_token(ctxt, token)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/api.py", line 615, in auth_destroy_token
(nova.api.openstack): TRACE: return IMPL.auth_destroy_token(context, token)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 99, in wrapper
(nova.api.openstack): TRACE: return f(*args, **kwargs)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 1220, in auth_destroy_token
(nova.api.openstack): TRACE: session.delete(token)
(nova.api.openstack): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 1097, in delete
(nova.api.openstack): TRACE: self._attach(state)
(nova.api.openstack): TRACE: File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 1282, in _attach
(nova.api.openstack): TRACE: state.session_id, self.hash_key))
(nova.api.openstack): TRACE: InvalidRequestError: Object '<AuthToken at 0x301cb90>' is already attached to session '48825808' (this is '50390416')

Related branches

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Changed in nova:
assignee: nobody → Kevin L. Mitchell (klmitch)
Thierry Carrez (ttx)
Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.2
status: Fix Committed → Fix Released
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.