A common case is for Nova (or other service) to create a service
authentication plugin from a configuration file and then have many
greenlet threads that want to reuse that authentication. If a token
expires then many threads all try and fetch a new token to use and can
step over each other.
I was hoping for a way to put a lock in so that all plugins were thread
safe however fixing it for identity plugins solves almost all real world
situations and anyone doing non-identity plugins will have to manage
threads themselves.
Reviewed: https:/ /review. openstack. org/221738 /git.openstack. org/cgit/ openstack/ python- keystoneclient/ commit/ ?id=556c1a66339 31207370106478f a2d155fbffb126
Committed: https:/
Submitter: Jenkins
Branch: master
commit 556c1a663393120 7370106478fa2d1 55fbffb126
Author: Jamie Lennox <email address hidden>
Date: Wed Sep 9 22:38:04 2015 +1000
Identity plugin thread safety
A common case is for Nova (or other service) to create a service
authentication plugin from a configuration file and then have many
greenlet threads that want to reuse that authentication. If a token
expires then many threads all try and fetch a new token to use and can
step over each other.
I was hoping for a way to put a lock in so that all plugins were thread
safe however fixing it for identity plugins solves almost all real world
situations and anyone doing non-identity plugins will have to manage
threads themselves.
Change-Id: Ib6487de7de638a bc69660c851bd04 8a8ec177109
Closes-Bug: #1493835