← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1178732] Re: Eventlet dnspython monkey-patching problems

 

** Changed in: keystone
       Status: Fix Committed => Fix Released

** Changed in: keystone
    Milestone: None => havana-1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1178732

Title:
  Eventlet dnspython monkey-patching problems

Status in OpenStack Identity (Keystone):
  Fix Released

Bug description:
  
  We were in a hurry yesterday to fix Keystone gate on CentOS now that the testing infra is moving to CentOS from Oneiric for python 2.6. Essentially any test that starts up Keystone server fails.
  #TODO: Look into what's actually failing on CentOS. Use the debugger.

  Nova's got a fix where they set the EVENTLET_NO_GREENDNS env var, and
  also check that eventlet wasn't imported first and raise if it wasn't,
  see https://review.openstack.org/#/c/26325/4/nova/cmd/__init__.py and
  https://bugs.launchpad.net/nova/+bug/1164822 .

  I put a similar patch into Keystone but my attempt wound up breaking
  swift. In this case, I put the change in keystone/__init__.py so that
  it should happen anytime someone imports anything in keystone.*.
  Seemed like a good idea at the time, and it got the tests to work, but
  it was too pervasive since now everything that imports keystone.* now
  also imports eventlet, which I don't think we want because of
  eventlet's automatic monkey-patching.

  #TODO: figure out why swift is importing keystone?

  As a quick workaround to fix smokestack and swift, changes were made to
  1) set EVENTLET_NO_GREENDNS in the test environment: https://review.openstack.org/#/c/28802/
  2) Revert my original fix that changed keystone/__init__.py to import eventlet.

  This should buy us some time to work on a better fix where we set the
  environment variable in the right places. The change to the test
  environment should be reverted once we've got it.

  There's a couple of places where we need to make sure the env var is set:
  1) when start keystone server from command-line, in keystone-all
  2) when running tests
  ** In other cases, do NOT want to import eventlet! For example, if running Keystone in Apache **

  First, it's easy to modify keystone-all to set the env var.
  The tests are a little trickier. I shouldn't have to put this in every test file. I'll look into adding an __init__.py in tests and doing it there if possible.

  Do not break swift this time. We should test with swift somehow
  #TODO: figure out how to test with swift. See if there's a testcase to be added to Keystone.

  Once Keystone works, we can revert https://review.openstack.org/#/c/28802/
  #TODO: If this is in stable/grizzly, revert there, too.

  Also, re-enable Keystone's IPv6 tests.

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1178732/+subscriptions