Merge lp:~vishvananda/nova/has_role_cache into lp:~hudson-openstack/nova/trunk
Proposed by
Vish Ishaya
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Rick Harris | ||||
Approved revision: | 745 | ||||
Merged at revision: | 1037 | ||||
Proposed branch: | lp:~vishvananda/nova/has_role_cache | ||||
Merge into: | lp:~hudson-openstack/nova/trunk | ||||
Diff against target: |
145 lines (+53/-22) 3 files modified
nova/api/ec2/__init__.py (+2/-4) nova/auth/manager.py (+48/-18) nova/flags.py (+3/-0) |
||||
To merge this branch: | bzr merge lp:~vishvananda/nova/has_role_cache | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Rick Harris (community) | Approve | ||
Brian Waldon (community) | Approve | ||
Devin Carlen (community) | Approve | ||
Review via email: mp+56449@code.launchpad.net |
Commit message
Uses memcached to cache roles so that ldap is actually usable.
Description of the change
Uses memcached to cache roles so that ldap is actually usable.
This lowers response time in our test environment from almost two seconds to .8 seconds for actions by non-admin users when using ldap.
This is sleepsonthefloor's code. I just merged trunk and fixed conflicts and formatting because he won't be able to update it in time for Gamma Freeze.
To post a comment you must log in.
49 + def _build_mc_key(self, user, role, project=None): %s-%s-% s" % (User.safe_ id(user) , role, safe_id( project) if project else 'None')))
50 + return str("rolecache-
51 + (Project.
Nitpicky, but it's more accurate to use rolecache-user-role for global roles, as opposed to rolecache- user-role- None.