trove/trove/cmd
Amrith Kumar dc85b2f21e Address issues with Trove eventlet monkey-patching
There have been several issues with the way in which Trove does its
monkey patching including the fact that oslo.messaging gets rather
annoyed if eventlet is incorrectly patched.

So, this change follows the recommendations in (note multi-line URL)

http://specs.openstack.org/openstack/\
openstack-specs/specs/eventlet-best-practices.html

Other things to keep in mind are that the old way in which Trove was
doing monkey patching was flawed. What Trove did was to first call

eventlet.monkey_patch(all=True, thread=False)

with the fond hope that this meant monkey patching of "all but thread"
would be done. However, the documentation and the code for the
function are pretty clear that this is not the case.

See: http://eventlet.net/doc/basic_usage.html

"If all is True, then all modules are patched regardless of the other
arguments. If it’s False, then the rest of the keyword arguments
control patching of specific subsections of the standard library."

This also explains why debugger didn't quite work well with Trove, the
whole purpose of the shenanigans that Trove was attempting to do.

Then there's also the wonderful fact that you can't reliably check
(with is_monkey_patched()) whether the 'thread' module is in fact
monkey patched. See (note the multi-line URL)

http://stackoverflow.com/questions/32452110/\
does-eventlet-do-monkey-patch-for-threading-module

Therefore the code actually attempts to issue a meaningful warning if
debugging is attempted with eventlet monkey patched.

This is related to a number of other bugs I've found that indict the
way in which projects have monkey_patched eventlet. See, for example,
https://review.openstack.org/#/c/156942/,
https://review.openstack.org/#/c/153699/, and
https://bugs.launchpad.net/neutron/+bug/1417386.

Change-Id: I92ab95f9113eae862e0cd56e7d65cdd48944615f
Closes-Bug: 1365736
Closes-Bug: 1510542
2015-10-29 22:17:33 -04:00
..
__init__.py Address issues with Trove eventlet monkey-patching 2015-10-29 22:17:33 -04:00
api.py Integrate OSprofiler and Trove 2015-02-14 13:08:43 -05:00
common.py Address issues with Trove eventlet monkey-patching 2015-10-29 22:17:33 -04:00
conductor.py Switch to oslo.service 2015-07-17 17:05:44 +03:00
fakemode.py Fake mode service does not start after the changes to the oslo 2015-07-02 17:04:02 -05:00
guest.py Address issues with Trove eventlet monkey-patching 2015-10-29 22:17:33 -04:00
manage.py Associate flavor types with datastore versions 2015-08-11 23:13:02 -07:00
taskmanager.py Switch to oslo.service 2015-07-17 17:05:44 +03:00