Keystone returns traceback for db backend

Bug #1291047 reported by Adam Young
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Morgan Fainberg

Bug Description

Revision history for this message
Adam Young (ayoung) wrote :

Bug is likely triggered by this code in SQL Alchemy:

This seems as related to eventlet/tpool etc issues, here with SQLAlchemy.
For example like https://bitbucket.org/eventlet/eventlet/issue/118/exceptions-are-cleared-during

pattern is seen here
sqlalchemy/orm/session.py

 442 def __exit__(self, type, value, traceback):
 443 self._assert_is_open("Cannot end transaction context. The transaction "
 444 "was closed from within the context")
 445 if self.session.transaction is None:
 446 return
 447 if type is None:
 448 try:
 449 self.commit()
 450 except:
 451 self.rollback()
 452 raise
 453 else:
 454 self.rollback()

Changed in keystone:
assignee: nobody → Adam Young (ayoung)
milestone: none → icehouse-rc1
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Jamie Lennox (jamielennox) wrote :

So i'm by no means an expert in this but looking briefly exc info is cleared by preserves_excinfo defined here:

https://bitbucket.org/eventlet/eventlet/src/ba405bb1eb5981c703624967d13f04f0352093c6/eventlet/support/greenlets.py?at=default

so if you are using greenlet>=0.3.2 which is what is currently defined by the global requirements.txt then exception handling should be ok. (otherwise it's an eventlet bug)

I'm not sure how we test this.

Revision history for this message
Dolph Mathews (dolph) wrote :

Increased priority, as this has security implications.

Changed in keystone:
importance: Medium → High
Dolph Mathews (dolph)
Changed in keystone:
assignee: Adam Young (ayoung) → Morgan Fainberg (mdrnstm)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/81385
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=319ebe1571c8012aa2f1e6c2b4ec2e79c891556f
Submitter: Jenkins
Branch: master

commit 319ebe1571c8012aa2f1e6c2b4ec2e79c891556f
Author: Morgan Fainberg <email address hidden>
Date: Tue Mar 18 15:07:23 2014 -0700

    Do not expose internal data on UnexpectedError

    UnexpectedError now works much-more akin to SecurityError and
    obscures internal data from being leaked unless running in debug
    mode.

    Change-Id: I8c8895f5c9db9f51dec014da24f7e86d607d0363
    Closes-Bug: #1291047

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-rc1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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