diff options
| author | Jesse Andrews <anotherjesse@gmail.com> | 2012-03-07 13:05:28 -0800 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-03-12 12:37:31 -0700 |
| commit | 1bcf5f5431d3c9620596f5329d7654872235c7ee (patch) | |
| tree | 3934fccd4a4fd943a1df72a673e11420d31f519d /nova/auth | |
| parent | 43b95ca29ec5ad318c771d03d151a9425e138cec (diff) | |
| download | nova-1bcf5f5431d3c9620596f5329d7654872235c7ee.tar.gz nova-1bcf5f5431d3c9620596f5329d7654872235c7ee.tar.xz nova-1bcf5f5431d3c9620596f5329d7654872235c7ee.zip | |
improve speed of metadata
* don't load every possible answer, only do what is needed
* cache instance data for a given address for a 15 seconds
using either memcache or fake memcache (in-memory).
This means only a single queue/db lookup for multiple calls
to metadata service
* add cache expirey to fake memcache (don't grow forever)
and move it to nova.common.memorycache
Addresses Bug #851159
Change-Id: Icf794156e055b18915b8b5be9ba2ab97d2338bbe
Diffstat (limited to 'nova/auth')
| -rw-r--r-- | nova/auth/ldapdriver.py | 2 | ||||
| -rw-r--r-- | nova/auth/manager.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/nova/auth/ldapdriver.py b/nova/auth/ldapdriver.py index 4c9431b8e..91135f1c7 100644 --- a/nova/auth/ldapdriver.py +++ b/nova/auth/ldapdriver.py @@ -96,7 +96,7 @@ LOG = logging.getLogger(__name__) if FLAGS.memcached_servers: import memcache else: - from nova.testing.fake import memcache + from nova.common import memorycache as memcache # TODO(vish): make an abstract base class with the same public methods diff --git a/nova/auth/manager.py b/nova/auth/manager.py index ca2a3add5..f03e453b8 100644 --- a/nova/auth/manager.py +++ b/nova/auth/manager.py @@ -97,7 +97,7 @@ LOG = logging.getLogger(__name__) if FLAGS.memcached_servers: import memcache else: - from nova.testing.fake import memcache + from nova.common import memorycache as memcache class AuthBase(object): |
