Trove is not monkey patching eventlet early enough

Bug #1310785 reported by Tim Simpson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
High
Tim Simpson

Bug Description

Trove API isn't calling the eventlet monkey patch routines early enough, leading it to use certain packages which can't be safely mixed with eventlet greenthreads.

To see, open up trove/flavors/views.py and replace the FlavorsView.data method with this:

def data(self):
      import thread
      from eventlet.patcher import is_monkey_patched
      return {"Thread is using eventlet": "%s" % str(is_monkey_patched(thread)) }

Next, start up Trove API and list the flavors. What you'll see come back is:

{"Thread is using eventlet": "False"}

This is dangerous for a number of reasons.

Now, if trove/cmd/api.py is fixed by adding the monkey patch logic to the top the flavors view will show the eventlet version of the thread module is being used.

Changed in trove:
assignee: nobody → Tim Simpson (tim-simpson)
importance: Undecided → Critical
importance: Critical → High
Changed in trove:
milestone: none → juno-1
status: New → Confirmed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to trove (master)

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

Changed in trove:
status: Confirmed → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/89425
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=ac572a8ae01784c0b9442320bf131938de90b102
Submitter: Jenkins
Branch: master

commit ac572a8ae01784c0b9442320bf131938de90b102
Author: Tim Simpson <email address hidden>
Date: Thu Apr 24 14:42:39 2014 -0500

    Make sure eventlet starts correctly

    This commit prevents a bug where eventlet was not being monkey patched
    correctly. It also puts some code common to most of the scripts into
    a common module to prevent some of the confusion surrounding
    this and other initialization issues.

    Closes-Bug: #1310785

    Change-Id: I433dde896d7384e577e60ac3dd795a9c5c97d689

Changed in trove:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: juno-1 → 2014.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.