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')