Comment 32 for bug 1282865

Revision history for this message
Jamie Lennox (jamielennox) wrote : Re: Keystone middleware may confuse contexts

Sorry, this is the first i've seen this bug. I agree with brant here that i don't want to assume that auth_token is always running under eventlet. It's definetly not always the case.

I'd prefer to put the change in at top of openstack.common.memorycache that says:

if eventlet.already_patched and not patcher.is_monkey_patched('thread'):
    raise ConfigError("You have incorrectly configured eventlet")

This should inform all servers of the problems of mixing eventlet and memcache - i'm getting kind of sick of eventlet's magic and would just prefer to raise the error. If not the same auto-patch that you proposed above for keystoneclient but in the memorycache module should be ok.

The main problem i see with that is is it possible for a server to load auth_token middleware prior to having called the monkey patch function? In keystone and others that have a bin/keystone-all that manages the paste file internally it should be fine, however anyone that wanted to use a more pure paste deployment would load auth_token first - is this a situation that happens in any servers? Does it need to be like a on first memcache get check thread patched and then flag it as done?